Thank you all. JavaScript history.go(-2) works like a charm.
Urmil -----Original Message----- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Friday, August 13, 2004 7:54 AM To: Shah, Urmil; [EMAIL PROTECTED] Subject: RE: BACK button in CGI From: Shah, Urmil <mailto:[EMAIL PROTECTED]> wrote: : This is a very basic question but still confusing me : and so trying to get help. : : : : I have 3 CGI FORMS that display HTML output. One : form leads to second and second leads to third. On : 3rd page If I want to redirect the user to page 1 : how do I do that. In javascript: history.go(-2) In perl: $q->redirect( 'url/to/page' ); (Assuming $q is a CGI.pm object) : I tried to use JavaScript history.back() function : and it works only to take to the previous page. : (i.e 2 --> 1) and (3 --> 2 --> 1). I was wondering : if I can go directly to 1 from 3. history.go(2) // assumes you have two pages in // your forward list. : Is there any solution in CGI or I have to use JavaScript. You can use either language. Note that browser caching and page rendering will affect the way each displays the page. You should experiment with each before deciding on one. And, of course, remember that some of us edit or block JavaScript. HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 PS You'll have to double check the JavaScript stuff. I'm a little rusty. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>