Datarefreshment after ging "back" 
Author Message
 Datarefreshment after ging "back"

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.



Sun, 01 May 2005 20:26:09 GMT  
 Datarefreshment after ging "back"
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
  }

Quote:
}

</script>
<body onload="setup()">

<form name=myform .... >
 <input type=hidden name="_init" value="">
 </form>


Quote:
> 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.



Sun, 01 May 2005 23:19:14 GMT  
 Datarefreshment after ging "back"


Fri, 19 Jun 1992 00:00:00 GMT  
 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.



Mon, 02 May 2005 02:33:47 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disabling "BACK"/"FORWARD" buttons

2. Disabling "BACK"/"FORWARD" buttons

3. How do I Prevent a "Back"

4. How to disable the "Back" button

5. Remove Links From "Back" Navigation

6. Reload page on "back"

7. How to forbid "back" button

8. forcing a browser "Back"

9. passing Exec.StdOut back "live"?

10. "Back" upset by vbScript

11. Going "Back" in server-side script

12. Disable "Back" Button

 

 
Powered by phpBB® Forum Software