From: chumley on
I have a javascript history object (javascript:history.go(-1)) that
goes back to previous page when I trigger a button event to go back to
that last page :
<form action="javascript:history.go(-1)" method="post">
<input type="hidden" value="yes" name="awc" id="awc">
<input type="submit" value="BACK">
</form>

...but doing a test to response write to see if it's posting to the
previous page:
if request.form("awc") = "yes" then
response.write "yes "'
end if

....I do not see the "yes" displayed. wondering if combining this
javascript object with this simple ASP is valid, tho it looks like it
should be. Even doing method="get" , I don't get my "yes" display :-(

??
chumley
From: Dooza on
On 04/03/2010 22:57, chumley wrote:
> I have a javascript history object (javascript:history.go(-1)) that
> goes back to previous page when I trigger a button event to go back to
> that last page :
> <form action="javascript:history.go(-1)" method="post">
> <input type="hidden" value="yes" name="awc" id="awc">
> <input type="submit" value="BACK">
> </form>
>
> ..but doing a test to response write to see if it's posting to the
> previous page:
> if request.form("awc") = "yes" then
> response.write "yes "'
> end if
>
> ...I do not see the "yes" displayed. wondering if combining this
> javascript object with this simple ASP is valid, tho it looks like it
> should be. Even doing method="get" , I don't get my "yes" display :-(

Your page won't submit the form data, as your using Javascript to
effectively press the back button. I would use a session variable on the
previous page, call it previous page. Define it as
Request.ServerVariable("SCRIPT_NAME"), then set your action to your form
as the session variable.

Dooza
From: Evertjan. on
Adrienne Boswell wrote on 05 mrt 2010 in
microsoft.public.inetserver.asp.general:

> By the way, you're reinventing the wheel. There is a back button on
> the user's browser, as well as a handy dandy backspace key that does
> the same trick, not to mention the mouse gesture, should the client be
> so enabled.

Or the ALT-LeftArrow.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
From: Bob Barrows on
chumley wrote:

> No, has to be customizeable button that carries querystrings upon
> conditions. I have a lot of these figured out now, thanks for looking/
> replying :-), may hav more questions regarding this
> chumley

Well, you'll get more people looking at them if you post them to relevant
newsgroups. Client-side questions should be asked at .scripting.jscript or
comp.lang.javascript.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"