This is due to how browsers will save form state between page refreshes.
If you want to reset form values between refreshes, manually set the value
But if it's just a hidden input you're worried about... the chances of
somebody fiddling with the value of it is pretty small. For other inputs
(text, etc) it's probably best to leave the default browser behavior alone
so as not to surprise anybody.
On Thu, May 20, 2010 at 2:57 PM, patrick <patrick99...@gmail.com> wrote:
> I am having a hell of a time solving a problem in my application due
> to the fact that page reloads do not seem to set input values
> properly... I don't understand this at all, and am hoping someone
> here can provide some insight and hopefully a solution.
> If I have static html that does:
> <input type="hidden" value="blah" id="foo" />
> and then in firebug's console, I do:
> => "foo"
> >$('blah').value = "bar";
> => "bar"
> (REFRESH PAGE)
> => "bar"
> !!! it should be foo, not bar!!! Is there a way to tell it to reset
> the values to the html?
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at