Doh! i can't believe I missed it...
Change the type to button... It will work then... type=submit causes browsers to run the form action. If you change it to type=button... it will work like hitting the back button on the browser. Sorry, -Mike -----Original Message----- From: David vd Geer Inhuur tbv IPlib [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 12:32 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: history.back() does not work in IE Hi, Looked good, but wasn't effective unfortunetly :( Here is what I did in the script : $submit = "<td><input type=submit value=Back name=\"needm\" Onclick=\"javascript:history.back();\"></td>"; # As I used it frequently Here is where I use it : #------------------- sub check_input { if (!($icname)) { print "<table><tr><td>You have to choose an IC-name, else I cannot create a new IC for you</td> ${submit}</tr></table>"; $exit ="on"; } if (!($icname =~ /^[A-Za-z0-9_]+$/)) { print "<tr><td>Sorry your IC-name cannot contain special characters</td>${submit}</tr>"; $exit ="on"; } if (!($feature)) { print "<tr><td>You did not fill in a feature !! </td>${submit} <td><input type=submit value=Ignore name=ifeat></td></tr>"; $exit ="on"; } if ( "$exit" eq "on" ) { print "</form></html>"; exit; } } # End sub check_input # ------------------------------- And this is the source of my final page with my history.back(); button : <head></head><body bgcolor="#99cccc" text="#000000" link="#0000FF" vlink="green"> <form method=get><tr><td>You did not fill in a feature !! </td><td> <input type=submit value=Back name="needm" Onclick="javascript:history.back();"></td> <td><input type=submit value=Ignore name=ifeat></td></tr></form></html> I know it's a lot, but thanks for your help in advance !! Regs David ---------------------- > > The javascript function should br written like so: > > <input type="button" name="needmoreinfo" value="Go back and correct it" > Onclick="javascript:history.back();"> > > -----Original Message----- > From: David vd Geer Inhuur tbv IPlib > [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 25, 2002 11:18 AM > To: [EMAIL PROTECTED] > Subject: history.back() does not work in IE > > > > Hi there, > > I am writing a CGI-script (using Perl of course! :). > > Ones the submit button is hit I check if some specific var's are set. > If not I give them some output and a back button > { <input type=submit Onclick="window.history.back()" } > > This works on Netscape, but not on IE. IE looses all of it's params, > while Netscape remembers them. The application needs to work on both > browsers, > does anyone have an idea ? > > I searched the web for a difference in syntax, but couldn't find it. > Is it IE in combination with Perl ?? > > > Thanks for your help in advance !! > > > Regs David > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]