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
on page load with javascript in a "dom:loaded" block

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.

Cheers,
Alex

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:
>
> >$F('blah');
> => "foo"
>
> ...
>
> >$('blah').value = "bar";
> => "bar"
>
> (REFRESH PAGE)
>
> >$F('blah');
> => "bar"
>
> !!! it should be foo, not bar!!!  Is there a way to tell it to reset
> the values to the html?
>
> -patrick
>
> --
> 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
> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to