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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Variable

Status
Not open for further replies.

vfpshe

Programmer
Jan 2, 2001
24
0
0
US
Please help.

I am quite new to ASP and VBScript. I'm having difficulty in passing a variable to a procedure.

I have

<input type=&quot;button&quot; value=&quot;Run&quot; onclick=&quot;call GetReportParam(<%=Session(&quot;SelRpt&quot;)%>)&quot; >

where Session(&quot;SelRpt&quot;) = Request.ServerVariables(&quot;QUERY_STRING&quot;)

I am able to do a response.write for Session(&quot;SelRpt&quot;) .

But when I use it in the onclick even above, it returns a false.

Please help.

Thanks.
 
Are you trying to call a procedure in your asp code from the browser, or to call a client procedure (in JavaScript, for an example)?
The ASP code is running on the server before sending the results to the browser client, and it's basically not possible to call it from the client.
 
Hey there,

Try putting single quotes around the Session value.. That should help..

<input type=&quot;button&quot; value=&quot;Run&quot; onclick=&quot;call GetReportParam([red]'[/red]<%=Session(&quot;SelRpt&quot;)%>[red]'[/red])&quot; >


Hope this fixes your problem.

Cheers,

G.



GT Interactive
-----------------------------
Components/Tools/Forums/Software/Web Services
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top