Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Hidden input Form , response.write not working

Reply
Thread Tools

Hidden input Form , response.write not working

 
 
chumley
Guest
Posts: n/a
 
      03-04-2010
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
 
Reply With Quote
 
 
 
 
Dooza
Guest
Posts: n/a
 
      03-05-2010
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
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      03-05-2010
Gazing into my crystal ball I observed chumley <(E-Mail Removed)>
writing in news:fd1d0523-833c-4767-95aa-
http://www.velocityreviews.com/forums/(E-Mail Removed):

> 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


ASP has no idea about what's happening on the client, so would never get
that information.

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.

There is another suggestion in this thread about using session variables.
That can work, but I prefer to explicitly state the name of the file for
the action attribute, or better yet, have the form submit to itself.

YMMV

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      03-05-2010
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)
 
Reply With Quote
 
chumley
Guest
Posts: n/a
 
      03-06-2010
On Mar 5, 6:50*am, Adrienne Boswell <(E-Mail Removed)> wrote:
> Gazing into my crystal ball I observed chumley <(E-Mail Removed)>
> writing in news:fd1d0523-833c-4767-95aa-
> (E-Mail Removed):
>
>
>
> > 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

>
> ASP has no idea about what's happening on the client, so would never get
> that information.
>
> 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.
>
> There is another suggestion in this thread about using session variables.*
> That can work, but I prefer to explicitly state the name of the file for
> the action attribute, or better yet, have the form submit to itself.
>
> YMMV
>
> --
> Adrienne Boswell at Home
> Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
> Please respond to the group so others can share


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
 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      03-06-2010
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"


 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      03-06-2010
Gazing into my crystal ball I observed chumley <(E-Mail Removed)>
writing in
news:(E-Mail Removed):

> On Mar 5, 6:50*am, Adrienne Boswell <(E-Mail Removed)> wrote:
>> Gazing into my crystal ball I observed chumley
>> <(E-Mail Removed)> writing in news:fd1d0523-833c-4767-95aa-
>> (E-Mail Removed):
>>
>>
>>
>> > 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

>>
>> ASP has no idea about what's happening on the client, so would never
>> get that information.
>>
>> By the way, you're reinventing the wheel. *There is a back button on
>> th

> e
>> 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.
>>
>> There is another suggestion in this thread about using session
>> variables.

> *
>> That can work, but I prefer to explicitly state the name of the file
>> for the action attribute, or better yet, have the form submit to
>> itself.
>>
>> YMMV
>>
>> --
>> Adrienne Boswell at Home
>> Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
>> Please respond to the group so others can share


Please don't quote signatures.

>
> 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


And what are you going to do if the user has client side scripting
disabled or unavailable? Just make sure that you're covered server side.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Require Hidden Input Not Working tea-mad brit HTML 5 01-17-2006 11:24 PM
associate a hidden input to (chosen) select option in form? Quasimido CSS HTML 2 11-07-2005 05:36 PM
Re: Working with hidden input controls and Visual Studio .Net 2003 Brock Allen ASP .Net 0 04-12-2005 09:57 PM
insert hidden input element to form david.mcreynolds@gmail.com Javascript 2 01-05-2005 07:29 PM
can i pass data with input text instead of input hidden? Walter ASP General 6 09-17-2004 11:16 AM



Advertisments