Thanks Dan, got it sorted now. Your answer is nearly correct. This is what l've used to get it to work:
onblur="ChangeNumber(\' '+pieces[1]+'\',this.value);"
Needed to put it in quotes.
&:-)
Ok, l've managed to get the function to be called but only when l specify the first element of 'onblur' (e.g. Smoking).
document.write('<input name="amount'+j+'" type="text" id="amount_'+j+'" value="'+pieces[2]+'" onblur="ChangeNumber(\'Smoking\',this.value);" size="2" maxlength="2"/>');
What...
Thanks Dan, unfortunately that doesn't seemed to have helped. In I.E nothing happens when l change the value in the text box. (i.e the cookie is not updated). And in Netscape l get the error:
Error: missing ) after argument list
Source Code:
ChangeNumber(Substance Abuse,this.value);
This...
Hi, what l want to do is once a user has changed an amount (which will be a number between 1 & 99) in a text box, l want a cookie, which contains a list of information about various items, to be updated. i.e to change one items amount to the value the user just placed in the text box.
The...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.