- 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
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. |