- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 5
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
62 Posted Topics
Re: Have you read the solution to the other thread? It's the exact same thing. Try adding this to your <select> box: [CODE=HTML] <select onChange="getProject(this.value)"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> [/CODE] | |
Re: The following code will also work on all major browsers EXCEPT Internet Explorer and IE-based browsers: [ICODE]index.html[/ICODE] [CODE=HTML] <html> <head> <script type="text/javascript" src="form_validate.js"> // Script created 2009 KnifeySpooney // http://wurbo.com // // Completely free to use and modify </script> </head> <body> <form action="submit.php" method="get" onSubmit="validate(this); return false;"> Test <input type="checkbox"/><br/> … | |
Re: Could you paste your [ICODE]<head>[/ICODE] tag and the portion of [ICODE]<body>[/ICODE] that is affected? That way, we can see exactly what is going wrong. Also, if you are able to, try viewing your Error Console to see if any JavaScript errors are showing up (function duplicate?) | |
Re: The only reason I use Hotmail at all is to use Windows Live Messenger (I use Pidgin), but I must use it because all of my friends use it. All the messenger protocols are the same when you use them in a third-party client... I would have no problem using … | |
Re: Why is there what appears to be a Windows 98/2000/XP scrollbar on the screenshots if you're a Linux guy? Just curious. | |
I can't seem to get the word "FrankenBot" aligned correctly with the image above it. I want the word to be to the RIGHT of the image, but for some reason it is being bumped off to the next line even though the image (and the div surrounding it) is … | |
![]() | Re: I have never personally scripted a file upload form, but I would imagine that it is done by giving each [ICODE]<input type='file'>[/ICODE] an incremental name like [ICODE]name=upload1[/ICODE] and so on. Then, in your PHP (or other language), you use a [ICODE]for[/ICODE] loop to go through each uploader and process it. |
Here's a script I worked up to convert binary code into ASCII. Didn't work out an ASCII to binary conversion yet. | |
Hi, I'm trying to create a Youtube video inserter script for my site. Long story short, I need to be able to prototype an HTML element and add a string into the element's innerHTML, like this: [ICODE]myObj.insertVid(5sw2OvIgoO8);[/ICODE] I'm using jQuery to getElementsByClass("sip"). [CODE]Object.prototype.insertVid = function(id) { if (id.length > 0) … | |
I answered a question a few days ago on Yahoo! Answers where I helped (did all the work for) the question asker. They were asking for a way to parse text from a <textarea> and search for HTML-like elements that were named in a database (or an array, in my … | |
Re: You can't nest [ICODE]<form>[/ICODE] elements. If one [ICODE]<form>[/ICODE] is started, then you must close it before adding a new form. As far as onChange, you have it almost correct. Your only problem is that you included [ICODE]javascript:[/ICODE] in the front of your code execution. The onChange event is similar to … | |
Re: Actually, change this line: [CODE=JavaScript]row.parentElement.removeChild(row);[/CODE] To this: [CODE=JavaScript]row.parentNode.removeChild(row);[/CODE] parentElement is not defined in Firefox, but parentNode will be evaluated in both IE and Firefox. | |
Re: [URL="http://www.daniweb.com/code/javascript.html"]Here is the link to the JavaScript snippets page.[/URL] (mine is the binary one :)) | |
Re: It is possible to move windows. [URL="http://www.java2s.com/Code/JavaScriptReference/Javascript-Methods/moveToExample.htm"]http://www.java2s.com/Code/JavaScriptReference/Javascript-Methods/moveToExample.htm[/URL] | |
Re: You could also try: [CODE=JavaScript]<html> <body> <script type="text/javascript"> function notAQuote(e) { var keynum; var keychar; var numcheck; if(window.event) // IE keynum = e.keyCode; else if(e.which) // Netscape/Firefox/Opera keynum = e.which; var notQuote; switch (keynum) { case 34: notQuote = false; break; case 39: notQuote = false; break; default: notQuote = … | |
Re: Just change the file extension to .php instead of .php3, if your web server can handle anything more than PHP3. What is your PHP version? If you don't know, make a new .php file with only this typed: [CODE=PHP]<?php echo phpinfo(); ?>[/CODE] | |
Re: Are you talking about something like this? [CODE=HTML]<html> <head> <script> function AB() { alert("Ran function AB()"); } function BC() { alert("Ran function BC()"); } </script> </head> <body> <form> <input type="text" onkeyup="AB();BC();"/> </form> </body> </html>[/CODE] The previous example will work. | |
Re: This, sir, is exactly what JavaScript was created for. Here is an example of how to access a form element with the name "input1": [CODE=HTML]<html> <body> <form onSubmit="return getFormValue()"> <input type="text" name="input1"/><br/> <input type="submit" value="Submit"/> </form> <script type="text/javascript"> function getFormValue() { var myInput = document.getElementsByName("input1"); if (myInput) alert("input1's value: " … | |
Re: Could you add an HTML example? I'm not sure how to visualize what you're trying to do. | |
Re: Try this: [CODE=HTML]onBlur="isNumeric(this.value)"[/CODE] | |
Re: Is your problem not getting the function to work, or that PHP is not echoing the <script> tag? It seems that you don't have correct closing brackets in your AnalyseFaultCheck() function. Here's how it looks spaced out: [CODE=JavaScript]function AnalyseFaultCheck(){ var reasonDropdownList=document.getElementById("whatisthereasonforfaultslippage"); var statusDropdownList=document.getElementById("status"); var updateButton=document.getElementById("update"); var proposedActions=document.getElementById("proposedactions"); var userInfo=''; if("Duplicate … | |
I was helping a friend fix some issues with her iPhone connecting to a JavaScript-heavy (and buggy) site. Long story short, her iPhone cannot type brackets ([]), and I need another way of getting the first element in an array. I thought there might be a javascript function like first() … | |
Re: What errors are you getting or not getting in Opera? | |
Re: So basically, you're asking for something similar to Google autosuggest, except with names? Try this: [CODE=HTML] <html> <body> <script type="text/javascript"> function suggest(e, o) { var suggestDiv = document.getElementById('suggest'); var namesList = new Array(); namesList.push("Will"); namesList.push("Bob"); namesList.push("Joe"); namesList.push("William"); namesList.push("Jared"); var suggest = new Array(); var i; var keychar = ""; // … | |
Re: After a Google search, it seems other people have had the same problem. There is no event handler for iframe location changing (as of now). However, if you can edit the source page of your iframe, you can add some javascript calls inside the frame document like this: [CODE=JavaScript] // … | |
Re: The anchor tag will actually work, you just don't know how to implement it. Add this tag INSIDE your AJAX <object> element. [CODE=HTML] <object height="405" width="660"> <a style="padding-right: 660px; position: relative; bottom: -15px; visibility: hidden;" name="jump">Video</a> <!-- The rest of your params and embed code --> </object> [/CODE] Then, when … | |
Re: [QUOTE=almostbob;879254]A site that does [I]anything[/I] other than close when I click close, will never get another visit.[/QUOTE] +1 You can always provide an easy-to-use navigation menu if you need your users to be able to get around easily. | |
Re: [QUOTE=essential;878013]Did you mean loading an iframe dynamically or static?[/QUOTE] I think it would be more efficient to make it dynamic since you don't want to have to load many iframes. Try: [ICODE]preview.js[/ICODE] [CODE=JavaScript] function preview(obj) { if (obj.innerHTML) closePreview(obj); if (obj.href) var src = obj.href; else return false; var iframe … | |
Re: Please note that this will not work on many OSes (mainly Unix-based such as Mac and Linux). I think the only supporting browser is Internet Explorer for Windows, since WScript can only be accessed through ActiveX. The only possible reason you might want to use this is if you're not … | |
Re: Custom fonts are not supported currently by enough browsers to be a useable method. The only real way to create your own fonts is to either have a PHP script write an image with a font, or get an application like Flash to write your font. | |
Re: [QUOTE=PsychicTide;877712]just google [...] and you'll find what you need.[/QUOTE] +1 Is that not the answer to everything? | |
Re: Try this: [CODE=HTML] <html> <head> <script type="text/javascript"> function randomize(min, max) { if (!min) min = 0; if (!max) max = 1; return Math.floor(Math.random()*(max+1)+min); } function randomBg() { var bgs = new Array(); // I took these images from a site with a similar script already only to get example images … | |
Re: Might be an infinite loop. Check to see if there are any properties that IE does not recognize, ie: [CODE=JavaScript] for (var i=0; i<myObject.MozillaOnlyProperty; i++) { [/CODE] If IE doesn't recognize [ICODE]MozillaOnlyProperty[/ICODE], it might keep increasing [ICODE]var i[/ICODE] without end. | |
Re: [QUOTE=essential;875352]You can use the [icode]replace()[/icode] method. e.g. [code]loc = "#http://www.wesite.com/".replace(/#/ig, ""); alert( loc );[/code][/QUOTE] You don't want to do a global search on this one, just remove the hash at the beginning. Otherwise, the URL you want to redirect to may have an anchor on it, e.g. [ICODE]#http://www.website.com/test.html#Contacts[/ICODE]. [code] loc … | |
Hi, I need to parse an HTML string received from an AJAX request. I wrote a function that places the HTML string into an unappended (not added) [ICODE]<div>[/ICODE], which opens the string up to the DOM hierarchy. However, when I try to access the elements of this [ICODE]<div>[/ICODE], I get … | |
Re: As with many things in programming, there is more than one way to do something. You could pretty much use any server-side language with any database (or text file if you're cheap). Basically all you need to do is make a server-side script (you don't [I]have[/I] to use PHP, but … | |
I'm having a problem with adding onClick events to [ICODE]<a>[/ICODE] tags. The attribute is never added at all, but no errors are shown in the JavaScript console. I'm using Firefox 3.0.10. Here's my code: [CODE=HTML] <html> <head> <script type="text/javascript"> function setAJAXAttributes() { var domain = new RegExp("(" + window.location.host + … | |
I'm trying to write a demo page for my site that works completely on AJAX. What I mean by this is that the page will stay the same, but load new pages by changing the <BODY> of the document. I'm writing a script that will take every link and decide … | |
Re: I haven't used MooTools before, but I would imagine it uses percentages based on mouse coordinates. Try asking in the [URL="http://www.daniweb.com/forums/forum145.html"]Existing Scripts section[/URL]. In that forum they discuss JavaScript frameworks. | |
Re: You actually don't need to use RegExp if you're using the match() method. Here's an example: [CODE=JavaScript] function test(matchit) { thedata = "This is the hello world program"; r1 = thedata.match(matchit); if (r1 == null) alert("No Match") else alert(r1[0]); } [/CODE] | |
Re: You may want to check out this JavaScript implementation of shape drawing. [URL="http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm"]http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm[/URL] | |
Re: Are you asking for how to play the music, or how to keep it continuously streaming on page change? - For playing, find an online app that plays music, such as [URL="http://www.myflashfetish.com/makemp3.php?id=14"]MiniPod[/URL]. - Once you've embedded your music player, the real challenge is keeping the music streaming. There are a … | |
Re: To add on to almostbob's post, this is what worked for me (Firefox v3.0.10): [CODE=HTML] <a href="http://www.w3.org/" target="iframeID">Redirect frame to W3.org</a><br/> <iframe frameborder="0" src="http://www.daniweb.com/" name="iframeID" style="width:100%; height:90%;">iframe</iframe> [/CODE] As for making sure the pages can only be viewed in a frame, try adding this JavaScript to all your frame pages: … | |
Re: Make sure that you include the percent sign (%) after 100 so that it looks like [ICODE]height: 100%;[/ICODE] | |
Re: Try adding this to the textarea CSS: [CODE=CSS]white-space:normal;[/CODE] | |
Re: Looks fine for me on both Firefox and IE8. May be a problem on your end then ;) It might be that your browser has its zoom way low. Try typing CTRL+0 (zero) or going to View > Zoom > 100% | |
Re: Here is an example script that can help you learn Regular Expressions. [CODE] <html> <head> <script type="text/javascript"> function removeSlash(string, searchFor) { // This searches for all occurrences of searchFor that occurs more than once // {2,} means 2 or more repeats // The second param, "i", marks the search case-insensitive … | |
Hi, I just joined. This looks like a fairly good tech help forum site. I hope to be able to solve some problems people are having. I'll just use the template in the Read Me to describe me :P When using a computer, I generally like to stay on one … | |
Re: This is much more easily obtained with AJAX than reloading an entire page. To do this, make a separate ASP file that returns an XML formatted page with information from your MySQL database. Then, use AJAX to take that XML and add the entries to the select boxes. [ICODE]// Adding … | |
Re: It might be the use of the parent window instead of the current document by your scripts. Check your scripts to see if they use the [ICODE]window[/ICODE] object instead of the [ICODE]document[/ICODE] object. Change things such as [ICODE]window.location.href[/ICODE] to [ICODE]document.location.href[/ICODE] |
The End.