I have a questionnaire where each question id is "q(Question number)".. e.g. q1 in ascending order. This was so that I could check all the questions in a WHILE statement, rather than going tediously through 13 questions... My problem is this function I'm using to check the form seems to not work and I don't know what's wrong with it. All relating code has been posted here to show you my method.Note: Question 3 has a 3a and 3b question (ids are q3.1 and q3.2) Though it is not required 3.1 is answered unless the value from question 3 is 0 or -1.
Note: Question 8 and 10 work similarly but they are a "Yes/No" question, so it's a boolean. If either of them have a 1, then q8.1 or q10.1 are required.Note: This function was on an onsubmit in the <form> tag.(Random Related Question: If one Javascript function doesn't work, does it also make all the other javascript nonfunctional? That seems to be the case here.)
if (document.layers) {
browserType = "nn4"
} else if (document.all) {
What I want the program to do is to check to see if a last name has been input and if the field has been left blank then to return to the field and display the alert message. The alert message is displayed when the field is left blank but it is also displayed when the field is not blank. Can't figure out what I am doing wrong. This is the part of my input that is giving me problems:
I have a validate function that checks the form for blanks and all, also in the window.onload function I have one where it checks the format of the cc num and exp date. I am trying to get them to work together so that after I have entered the ccnum and ccexp it still makes me enter in the information needed for validate function. Right now after the ccnum and ccexp is entered it passes and submits.
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:www.w3.org/1999/xhtml"> <head>
heres my problem i hav done only one of the web pages so far and i want a little pop up message to appear when someone clicks on a website that is not needed here is my code:
This function sums the input (numbers) from many textfields called "Quantity" - in a typical e-Commerce environment - and stops the user if a minimun quantity is not reached code...
The function is working perfectly on IE, but on FF I get the error "rig is not a function" on line code...
I have this function to add some parameters to my XSL and then retransform my XML with it, resulting in a neatly filtered table. It works great, but as soon as I take out the alert, it doesn't do anything anymore, seemingly. This is the function: Code:
I have a webpage with a single form. Under that form I have two separate lists of checkboxes. One set is called eventList the other is assigneeList.I have added two other checkboxes, one is as follows,
What I want to do is, check all the assigneeList boxes with the same value as the checkAllDelegates checkbox. And the same go the other set respectively.Through rummaging around I came up with the following,
Using Firefox's Web Developer Toolbar, I learned that (allegedly) "this.hideError(obj) isn't a function." Event though it is clearly presented in the code as a function:
I'm having a small issue with being able to use the onclick more than once. When I load the page and click the link the request works fine the first time. But if I cancel the request then goto click the link again, nothing happens.
I have a dropdown that when the user selects an item, a function is called. Right it is giving me an error of 'object expected'. Can someone please take a look at my code below and let me know where I am going wrong? When I change the filldesc to an alert, it works fine and returns the correct values.
function filldesc(inputlevel1) { alert(inputlevel1); } <!-- Level one Headings --> <select name='level1' ...
why my onblur() function is not working in javascript.Code is pretty simple. Its a text box with an onblur() function showing an alert. I have used it long back.. But i could not figure out why its not working now.. I dont know what the silly mistake i have made.
I have a button that when clicked, I want to change the content of a DIV. Please see my code below. I'm connecting to the library as I'm using a few others bits and pieces of jQuery.
Code JavaScript: $(document).ready(function(){ function addtoBasket(id){[code]......
I wanted to remove the character " | " typed from keyboard on a ASPX page. But the " | " is on ASPX page which cannot be accessed. Can javascript remove the " | " listed on the ASPX page? <td class="prog-asset"> | <a href="/global_id=002350">Video</a> | <a href="global_id=002350">Photography</a> | <a href="global_id=002350&">Press Releases</a> | </td>
I am trying to build a function that displays the current day for example today is monday so I simply want it to say monday. however I have noticed javascript displays the current day of the week in numbers so:
monday = 1 tuesday = 2 wednesday = 3
and so on, however I cannot see why this function is not working to display the full names:
Code: function datecount(){ var date = current.getDay(); var day = "Current Date Is Undefined" if (date = 1) { var day = "monday" } [Code]...
function calcHeight() { //find the height of the internal page var the_height= document.getElementById('the_iframe').contentWindow. document.body.scrollHeight; //change the height of the iframe document.getElementById('the_iframe').height= the_height; }
Above is a simple function that I am using to resize an iframe to match the height of the page it is displaying. It is working in all other browsers including IE7 and IE8 but fails in IE9. Here is a link to the page it is on. [URL]
I have been asked to include a print function in my program so that it works once i have finished the program, the function works at the start of the program but disapears when its finished i dont know where i have went wrong:
In the file script.js I got 2 functions: Code: function tooltip(){ var m=document.getElementsByTagName("A"); var k=[]; var mover = document.createAttribute("onMouseOver"); mover.nodeValue = "showtooltip()"; for (var i = 0; i<m.length; i++) { var mover = document.createAttribute("onMouseOver"); mover.nodeValue = "showtooltip()"; m[i].setAttributeNode(mover) }} This one is working. It's putting into <a href="#" title="some title" /> an attribute: onMouseOver with value: showtooltip()
And that's my 2nd function. Code: function showtooltip() { document.write(this.getAttribute("title")); }
When event is run the function isn't working. But when my html looks like this: Code: <a href="#" title="some title" onMouseOver="document.write(this.getAttribute("title"))">link</a> Everything is fine. And javascript console doesn't show any errors.
My 2nd problem is, that onMouseOver doesn't work in chrome (I got dev version). Even function like this: Code: showtooltip() { document.write("......"); }
I've been working on RSA encryption using javascript and php for quite some time but i'm not able to do it properly. i'm using the standard RSA.js,BigInt.js and Barrett.js javascript files for the javascript part but the thing that i have noticed is the public exponent is always 10001 or 3 . only then the function works. but the problem is the php file generates a comparatively larger public key exponent. if i use that in the javascript function it crashes.
I am creating a weather widget for the iphone. The program creates an xml request for a weather feed and then parses the response. Depending on the response different information is displayed. A different icon for each weather pattern. I have all of this working so far. What I want to integrate is the option to refresh the weather when a user taps on the icon.
Here is my code:
document.getElementByID("weatherIcon").innerHTML="<img src="Icon Sets/"+iconSet+"/"+MiniIcons[obj.icon]+iconExt/" border=2 onclick="refresh();">" function refresh() { weatherRefresherTemp(); }
I know that the function refresh works because it is called from another function that allows the refresh to happen automatically every 30 min. However, wanting to integrate an option to manually refresh I am trying to do it this way. The code never seems to fire, nothing happens. I've added the border option for testing and don't even see that. I've been using a javascript editor and I do not get any errors.
I'm using a textarea box and the onClick function to automatically highlight the code inside of it for the user to copy & paste elsewhere. But this function is not working at all in IE7. (tested fine in Chrome, FF & IE8) I googled and I see that this is a common error in IE7 but I can't seem to figure out what to replace the onClick code with to make it do the same thing.
HTML Code: <textarea name="code" cols="16" rows="3" wrap="VIRTUAL" class="bginput" onClick="this.focus();this.select()"> <style type="text/css"> CSS code here </style>
I have some basic functions to animate something, but they only seem to work in FF, Safari, Opera... but of course not in IE 6.0. I don't know what I'm doing wrong, yet. Tried adding the DTD doctype etc... nothing changes.
Demo right here <html><head> <title>test</title> <script type="text/javascript" src="js/jquery-1.4.2.min.js" ></script > <script type="text/javascript" src="js/jquery-ui-1.8.2.min.js" ></script > .....