Forum Moderators: open

Message Too Old, No Replies

hidden input and updated before submit

         

pppswing

10:22 am on Dec 18, 2007 (gmt 0)

10+ Year Member



Hi,

Here's another question :

I have a form with an hidden input


<input type="hidden" id="cat" name="cat" value="0">

I have a javascript function to change cat value :


function fad(mib){
d=document.getElementByID("cat");
d.setAttribute("value",mib);
}

Then I have an input image that is my submit :


<input name="submito" onclick="fad('Multi');this.form.submit;" value="Multi" style="border:none;" type="image" src="images/telepdf.gif"

So basically I am supposed to get a 'cat' parameter with value Multi, but it doesn't work on IE and Firefox.

Any hints?

daveVk

11:12 am on Dec 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



getElementById NOT getElementByID

pppswing

1:50 pm on Dec 18, 2007 (gmt 0)

10+ Year Member



Thanks,
you save my day ;)