Updated Values not Sent with JS Form Submit

Hi, I’m having a little trouble with this here…

Before I submit the form with JS I update an input field with js like this:


document.getElementById('IC_Checksum').value = data;
imaginaryform.submit();

The problem is that the updated value is not sent along with the post data. Instead the old value is sent along.

When i submit the form with a button afterwards though (not auto submit after the value is set), then the value is sent along fine.

But that’s not how I want it to work…

Can anyone tell me how I can send the value that I’m setting with JS along with the post data like this?

Philip over at codingforums helped me with this, here’s the solution:

document.getElementById(‘IC_Checksum’).value = data;
setTimeout(“imaginaryform.submit()”,25);