Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

transferring a querystring

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
What do I have wrong in this piece of syntax?

varID = Request.Querystring("varID")

<FORM ACTION=&quot;loadfile.asp?varID=&quot; & varID&quot; METHOD=&quot;POST&quot; ENCTYPE=&quot;multipart/form-data&quot;>
 
That should read:
Code:
<FORM ACTION=&quot;loadfile.asp?varID=<%=varID%>&quot; METHOD=&quot;POST&quot; ENCTYPE=&quot;multipart/form-data&quot;>
Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
I don't know if you can help me in this too. I have a Javascript page and at the end I want to redirect the user to another page with the querystring I brought from the previous page. I am doing this:-

<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;Insert.asp?varID=<%=request.querystring(&quot;varID&quot;)%>&quot;>

however, since it is Javascript, it is giving me the following error:-

'request' is undefined

how can I redirect it?

Thanks very much for your help!
 
no it is a pure Javascript Page

<%@ LANGUAGE=&quot;JAVASCRIPT&quot; %>
<HTML>
<HEAD>
<TITLE> Upload Receiving Page </TITLE>
</HEAD>
<BODY>

etc......
 
Place the <%@ LANGUAGE=&quot;JAVASCRIPT&quot; %> after your form tag Saturday 12.00
im6.gif
im2.gif
im2.gif
20.00
im5.gif
im4.gif
im7.gif
3.00am
im8.gif
Sunday [img http
 
How can I? If I do that, it will not perform the Upload file component
 
Ah, the reason your getting that error is because by default ASP is in VBScript, so the Response object from VBScript will not work as you have it above. I'm not sure of the correct syntax to the read the form info in server-side javascript though, because I mainly work with VBScript for my ASP.

-Tarwn
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Hmm, try capitalizing the R in request and the Q in querystring and see if that works for you.
-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
For my next trick I will pull a hat out of a rabbit (if you think thats bad you should see how the pigeon feels...) :p
 
Believe it or not, it worked with the R as capital letter!

Thanks again Tarwin
 
Now if I want to attach another variable to the querystring, isn't the syntax like this?

<form name=&quot;form1&quot; method=&quot;post&quot;
action=&quot;Insert.asp?kunsillID=<%=Request.Querystring(&quot;VarID&quot;)%>&var=1&quot;>
 
Ok its working now, however I have a problem, the page I am transferring the vars to is not accepting the VarID for some reason. It is giving me the following error:-

The function expects a string as input.
 
Uuppsss my mistake.

I was doing the following:-

varId = Request.QueryString(VarID)

instead of

varId = Request.QueryString(&quot;VarID&quot;)

thanks for all your help guys!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top