I have an input form that accepts numbers. I am trying to compare the last field value to the current field value. My problem is that when I use the variable name of the last field in an object path, I get the error "null or not an object". The var 'L' is the problem in the statement below. If I manually type the field name in place of 'L', it works fine. How do I have to write this statement so 'L' works?
this is a re-post of the last item in ':after in js?', below, but the problem is no longer about ':after': now there's an 'else if' statement that doesn't work. This works: it looks for 2 conditions in a class name, and changes a class:
I have a simple problem that I can't solve. I am trying to code a "More Info" button/link to display some more technical details of an item, if required or wanted. I haven't tried incorporating any code in to my web site yet, first I am trying to test how it can be done in a seperate file.
What I have right now is a table with two cells. In one cell is static text, in the other is a hyperlink. The onClick event calls a JS function called "more_info()" in which a global varible is altered to contain the value 1.
Directly after these two cells is more JS (this is before the table ends). The JS here is checking to see whether the value of the global variable has been changed. If the value is 1, display information. There is no "else" clause because I don't want information displayed unless the variable is equal to 1, so it is not required.
I think I know what the problem might be. The browser is reading the code in question before I ever click the link and has already been executed before the variable is changed. I know JS is object oriented so it will not sit there waiting for me to click the button before reading the logical statements.
I actually got it to work okay, until I removed the last alert() I was using for debugging. Then the iframe stops being editable, and the editor.appendQuote() function either doesn't work or doesn't run.
The following script sets values for various input elements and I want exactly the same function to run for the on blur event of at least two fields. The first half of the script works fine - however when I take the $('#prod_id2unit_price').blur(function() and script it as a separate function and then call it from
The first part up to before the 'else if' works. but if the 'w1' has [URL] it still doesnt return true and display the DIV block??
<html> <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01EN"> <head> <title>Switch</title>
I have an array but I'm not exactly sure how to finish the build using an if statement. I have 6 elements and need the build to load a different top image for each array that loads that matches the specific element. Here is what I have but it only shows the first top image no matter what:
Is it possible to pass a variable into a if statement, What I mean is the function takes in variables i need to take one of those variable and put it in the actual statement.I need the check variable to be put in the if statement but all it does is throw an error because it can't find "check".
I have been assigned the old Pizza Form tutorial. My form asks for customer info, select size with radio button, and select toppings with checkboxes.I created a ValidateForm() function to check if these are filled in and output a message for each field saying "please fill in field."My problem now is that on Submit I need to print out a message with customer info, selected size, and selected toppings.I have the customer info done with a var message:
var message = "Name: " + name + " "; message += "Address: " + address + "