
Datarefreshment after ging "back"
Hi Dave,
thanks for this hint, it could be a wonderful idea but i dont think, this
will work.
Reading the value onload will give the default value of this field. The
correct (previously sent) value will be filled by the browser after loading
the page and before the user will be able to work with the page (perhaps
even before he can see it).
So the problem is more to know when (not if) it happened or could have
happened.
I am doing something with those values, but after or while loading the page,
all fields have their default values, the checkboxes are all unchecked.
After loading is completed, the browser fills the values with those, having
been sent. But nothing tells me, when this happened so i can start reading
the values (which is the first possible moment, because the values before
are all default)
sorry for not beeing that clear,
greetings,
dtr.
Quote:
> Set a hidden flag in your form the first time the page is loaded:
> <script ...>
> function init()
> {
> if ( document.myform._init.value ) {
> // form is already filled
> // user must have pushed the back button
> }
> else {
> document.myform._init.value = 1;
> // first time initialization
> }
> }
> </script>
> <body onload="setup()">
> <form name=myform .... >
> <input type=hidden name="_init" value="">
> </form>
> > Hi Newsgroup,
> > after filling a form, submitting it and going back to the formpage, the
> form
> > gets filled with the values having been sent. Is there a possibility to
> get
> > aware of this happening in the script?
> > example:
> > - check a checkbox in a form
> > - submit it
> > - go "back"
> > the prevously checked checkbox is checked, yet (not really yet, but
> again).
> > During pagebuilding the checkbox is unchecked. At a time after this, the
> > browser checkes it (it has to be checked, because it has been checked at
> > submitting).
> > Does any kind of event happen by or through this ?
> > I know, i could set a timer, to check the state of the checkbox, but i
> would
> > rather use a more relyable method.
> > thx to everybody trying to "check" this out,
> > greetings from Austria,
> > dtr.