|
 |
access_asp thread: Passing querystrings
Message #1 by "sharon buggle" <s.buggle@w...> on Thu, 23 Aug 2001 18:32:49
|
|
Got a question?
i have a form that displays records and gives the user option to enter
city name input field text.
When the find button is clicked the records that match are displayed.
i am running the pws which has asp 2.0 and does not support the
server.transfer so i am sending the url with document.location.href
"" document.location.href='FindCity.asp ';"">" where i saying on first
page citysearch=request.querystring("CityTx") where citytx is name of text
element. How do i put it in:document.location.href='FindCity.asp ';"">"
so i can pass the value to second page findcity.asp to do search and
display records.
If anyone knows please reply.
Thanks
Message #2 by Roger Balliger <Roger@i...> on Thu, 23 Aug 2001 11:49:09 -0700
|
|
Sharon,
You can't pass a value in the method you're attempting because the
document.location code would need the value from the form which isn't set
until after the FIND button is pressed.
You have to use a JavaScript function with an onClick method in the button
code to set the value in a variable that is listed in the document.location
code. For example,
<HTML>
<HEAD>
<script language="JavaScript">
function setVar()
{
varNameHere = document.form1.text1.value;
document.location.href='webpage2.asp?CityTx=' + varNameHere;
}
</script>
</HEAD>
<BODY>
<P> </P>
<form name=form1>
<input name=text1 type=text>
<input type=button value="FIND" onCLick="setVar();">
</form>
</BODY>
</HTML>
Roger
-----Original Message-----
From: sharon buggle [mailto:s.buggle@w...]
Sent: Thursday, August 23, 2001 11:33 AM
To: Access ASP
Subject: [access_asp] Passing querystrings
Got a question?
i have a form that displays records and gives the user option to enter
city name input field text.
When the find button is clicked the records that match are displayed.
i am running the pws which has asp 2.0 and does not support the
server.transfer so i am sending the url with document.location.href
"" document.location.href='FindCity.asp ';"">" where i saying on first
page citysearch=request.querystring("CityTx") where citytx is name of text
element. How do i put it in:document.location.href='FindCity.asp ';"">"
so i can pass the value to second page findcity.asp to do search and
display records.
If anyone knows please reply.
Thanks
Message #3 by "Zee Computer Consulting" <zee@t...> on Thu, 23 Aug 2001 12:22:33 -0700
|
|
Are you using the <FORM> and </FORM> tags? Why not let your FIND button on
page 1 submit the data for you (as part of a form)? It automatically calls
the next page with the parameters appended to the URL (the "GET" method).
Then you use "Request.QueryString" in the second page.
I am comprehending your problem correctly?
-- J
----- Original Message -----
From: sharon buggle <s.buggle@w...>
> i have a form that displays records and gives the user option to enter
> city name input field text.
> When the find button is clicked the records that match are displayed.
>
> i am running the pws which has asp 2.0 and does not support the
> server.transfer so i am sending the url with document.location.href
> "" document.location.href='FindCity.asp ';"">" where i saying on first
> page citysearch=request.querystring("CityTx") where citytx is name of text
> element. How do i put it in:document.location.href='FindCity.asp ';"">"
> so i can pass the value to second page findcity.asp to do search and
> display records.
|
|
 |