Request.Querystring/Form 
Author Message
 Request.Querystring/Form

Hi,

Is there a way that I can use the client side scripting (such as JavaScript)
to do the followings on my ASP page:

1) When a client navigates away from a web page by clicking a hyperlink , I
can insert a variable called ID=1234 to the Request.Querystring object. For
instance, http://www.*-*-*.com/ ?ID=1234
2) When a client navigates away from a web page by submitting from a form, I
can insert a hidden form element to the Request.Form object. For instance,
<input type="hidden" name="ID" value="1234">

Many thanks in advance!

Bill Chan



Sun, 15 Aug 2004 09:13:24 GMT  
 Request.Querystring/Form
for(x=0;x<document.links.length;x++)  {
  document.links[x].href += '?id=1234'

Quote:
}

pretty much the same with the hidden form element. I'm sure there are
more elegant ways though.

Atrax - MVP [Microsoft Most Valued Professional]

http://www.infinitemonkeys.ws/

Host with me for $100 a year!
http://www.atrax.ws/hosting/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 15 Aug 2004 10:59:50 GMT  
 Request.Querystring/Form
Added to Atrax's nice recommandation,

Only translated into vbs,

for i=0 to document.links.length-1
    document.links(i).href = document.links(i).href+'?id=1234'
next

On Bill's second question, Bill did already what he want.
Only insert the line inside the form to be submitted.
Then in receiving part,
x=request.form(request.form.count)

--
http://0000.info
Make Your IP Static


Quote:
> for(x=0;x<document.links.length;x++)  {
>   document.links[x].href += '?id=1234'
> }

> pretty much the same with the hidden form element. I'm sure there are
> more elegant ways though.

> Atrax - MVP [Microsoft Most Valued Professional]

> http://www.infinitemonkeys.ws/

> Host with me for $100 a year!
> http://www.atrax.ws/hosting/

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 15 Aug 2004 12:31:23 GMT  
 Request.Querystring/Form
Multilingualism isn't all it's cracked up to be...

: oops. forgot I was in the VBS group.
:
:
:
:
:
: Atrax - MVP [Microsoft Most Valued Professional]
:
: http://www.infinitemonkeys.ws/
:
: Host with me for $100 a year!
: http://www.atrax.ws/hosting/
:
: *** Sent via Developersdex http://www.developersdex.com ***
: Don't just participate in USENET...get rewarded for it!



Sun, 15 Aug 2004 13:27:03 GMT  
 Request.Querystring/Form
who speaks more than two languages is called multilingual.
two languages is called bilingual.
only one language is called American.

--
http://0000.info
Make Your IP Static



Quote:
> Multilingualism isn't all it's cracked up to be...




Quote:
> : oops. forgot I was in the VBS group.
> :
> :
> :
> :
> :
> : Atrax - MVP [Microsoft Most Valued Professional]
> :
> : http://www.infinitemonkeys.ws/
> :
> : Host with me for $100 a year!
> : http://www.atrax.ws/hosting/
> :
> : *** Sent via Developersdex http://www.developersdex.com ***
> : Don't just participate in USENET...get rewarded for it!



Sun, 15 Aug 2004 13:57:07 GMT  
 Request.Querystring/Form
Tis funny how not even us Americans know all of the AMERICAN language eh?
This is one of the few countries where the location that you live in
somewhat determine what language(s) you speak and HOW you speak them.  Sure,
all countries (mostly) have different dialects, be we HAVE MANY dialects.

I know many languages, but only one of them is a spoken language (BAD
ENGLISH) :)

The rest are programming languages.

Mythran


Quote:
> who speaks more than two languages is called multilingual.
> two languages is called bilingual.
> only one language is called American.

> --
> http://0000.info
> Make Your IP Static



> > Multilingualism isn't all it's cracked up to be...



> > : oops. forgot I was in the VBS group.
> > :
> > :
> > :
> > :
> > :
> > : Atrax - MVP [Microsoft Most Valued Professional]
> > :
> > : http://www.infinitemonkeys.ws/
> > :
> > : Host with me for $100 a year!
> > : http://www.atrax.ws/hosting/
> > :
> > : *** Sent via Developersdex http://www.developersdex.com ***
> > : Don't just participate in USENET...get rewarded for it!



Mon, 16 Aug 2004 00:12:22 GMT  
 Request.Querystring/Form
We have the same joke in Quebec.
Just change this line:

Quote:
> only one language is called American.
to:
> only one language is called an Ontarian.



Quote:
> who speaks more than two languages is called multilingual.
> two languages is called bilingual.
> only one language is called American.

> --
> http://0000.info
> Make Your IP Static



> > Multilingualism isn't all it's cracked up to be...



> > : oops. forgot I was in the VBS group.
> > :
> > :
> > :
> > :
> > :
> > : Atrax - MVP [Microsoft Most Valued Professional]
> > :
> > : http://www.infinitemonkeys.ws/
> > :
> > : Host with me for $100 a year!
> > : http://www.atrax.ws/hosting/
> > :
> > : *** Sent via Developersdex http://www.developersdex.com ***
> > : Don't just participate in USENET...get rewarded for it!



Mon, 16 Aug 2004 00:17:25 GMT  
 Request.Querystring/Form
Hi,

Many thanks for Atrax and Han and your valuable input, to which I appreciate
very much.  Following your suggestion, I need to put an event handler (such
as, OnClick) inside the anchor tag to run the Javascript/VBScript.  Is there
a way that Javascript/VBscript can trap the action that the user navigates
to another page by clicking a link, for instance, and can automatically run
the script to add the text of "id=1234".

Once again, thanks a lot.

Bill


Quote:
> Added to Atrax's nice recommandation,

> Only translated into vbs,

> for i=0 to document.links.length-1
>     document.links(i).href = document.links(i).href+'?id=1234'
> next

> On Bill's second question, Bill did already what he want.
> Only insert the line inside the form to be submitted.
> Then in receiving part,
> x=request.form(request.form.count)

> --
> http://0000.info
> Make Your IP Static



> > for(x=0;x<document.links.length;x++)  {
> >   document.links[x].href += '?id=1234'
> > }

> > pretty much the same with the hidden form element. I'm sure there are
> > more elegant ways though.

> > Atrax - MVP [Microsoft Most Valued Professional]

> > http://www.infinitemonkeys.ws/

> > Host with me for $100 a year!
> > http://www.atrax.ws/hosting/

> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!



Tue, 17 Aug 2004 23:27:55 GMT  
 Request.Querystring/Form
<a href='http://www.xxx.com/1.asp' name='link1' onclick="vbscript:
document.links('link1').href=document.links('link1').href &
'?id=1234'">test</a>

I've been thinking that the earlier replies are inefficient. They loops
meaninglessly. So try thie newer version.

--
Han
www.0000.info
Static IP Service


Quote:
> Hi,

> Many thanks for Atrax and Han and your valuable input, to which I
appreciate
> very much.  Following your suggestion, I need to put an event handler
(such
> as, OnClick) inside the anchor tag to run the Javascript/VBscript.  Is
there
> a way that Javascript/VBscript can trap the action that the user navigates
> to another page by clicking a link, for instance, and can automatically
run
> the script to add the text of "id=1234".

> Once again, thanks a lot.

> Bill



> > Added to Atrax's nice recommandation,

> > Only translated into vbs,

> > for i=0 to document.links.length-1
> >     document.links(i).href = document.links(i).href+'?id=1234'
> > next

> > On Bill's second question, Bill did already what he want.
> > Only insert the line inside the form to be submitted.
> > Then in receiving part,
> > x=request.form(request.form.count)

> > --
> > http://0000.info
> > Make Your IP Static



> > > for(x=0;x<document.links.length;x++)  {
> > >   document.links[x].href += '?id=1234'
> > > }

> > > pretty much the same with the hidden form element. I'm sure there are
> > > more elegant ways though.

> > > Atrax - MVP [Microsoft Most Valued Professional]

> > > http://www.infinitemonkeys.ws/

> > > Host with me for $100 a year!
> > > http://www.atrax.ws/hosting/

> > > *** Sent via Developersdex http://www.developersdex.com ***
> > > Don't just participate in USENET...get rewarded for it!



Wed, 18 Aug 2004 06:30:20 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Can I Request.form and Request.querystring?

2. Need more Request.QueryString and Request.Form help

3. How to use VBA to send Request QueryString to an ASP page

4. Serializing Request.Querystring

5. NameValueCollection, Request.QueryString, WebForm usage

6. For each sKey in Request.QueryString returns Error 451

7. Request.Querystring

8. Request.QueryString

9. Problems with listbox and asp and request.querystring.

10. alternative to Request.QueryString

11. VBScript Equivalent to Request.Querystring

12. Request.QueryString

 

 
Powered by phpBB® Forum Software