Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Back & Reset


Message #1 by speedguru@m... on Tue, 13 Mar 2001 06:22:01
on 13/3/01 6:22 am, speedguru@m... at speedguru@m...
wrote:

> hi,
> 
> on submission of a form, i have a thanks message & i wish to take back the
> user to the previous pg using Back button & javascript:history.back() in
> the onclick event. I want the values in the form to disappear ( reset ) so
> that the luser can start afresh. i tried document.form1.reset() in the
> oload event but it does'nt work. Help !
> 
> thanks for reading...
> 
> 
Instead of using history.back(); which just reloads the last set of
information the browser received, try using:

document.location="the URL for your page";

This will have the same effect as the user going back but will show the form
with empty input boxes as the user "hasn't been to this page before" (if you
see what I mean.

Hope this helps,
8-D
Luke


  Return to Index