Set hidden form field values with JavaScript but request still empty

Posted by tigerstyle on Stack Overflow See other posts from Stack Overflow or by tigerstyle
Published on 2010-06-03T12:32:51Z Indexed on 2010/06/03 12:34 UTC
Read the original article Hit count: 177

Filed under:
|
|
|
|

HI volks,

I try to set some hidden form field values with an onclick event. Ok, after I did something like this:

document.getElementById('hidden_field').value = 123;

I can output the value with the firebug console by entering this:

alert(document.getElementById('hidden_field').value);

So the values are definitely set. But now when I submit the form, the hidden field values are still empty.

Do you have any idea whats going wrong?

Thx for your answers.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about forms