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 request javascript onclick

Status
Not open for further replies.

ro6er

Programmer
Jul 1, 2003
76
I'm trying to request an onclick link on a page:
Code:
<a class="opacityit" href="#" onclick="javascript:showDiv();picx='<%=rs("ID")%>'"><img border="0" src="productimages/<%=rs("Thumbs")%>" width="79" height="79" alt="<%=rs("Alt")%>" /></a>
How would I request this in asp? I can't seem to get this to work.
Code:
Response.Write request("picx")
doesn't seem to work. I know it has to be something simple..
 
ASP is a server side techology, which means it has already run by the time your javascript (which runs on the client side) is executed.

There probably is a way to do what you want, but you haven't given enough details where I can make sense if it.


--------

GOOGLE is a great resource to find answers to questions like "how do i..."


--------
 
Perhaps I'm missing something here, but if all you want to do is access the contents of the "picx" variable, why don't you simply use the same server-side code you already use to assign a value to it, i.e:

Code:
Response.Write request(rs("ID"))

?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top