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!

simple syntax question

Status
Not open for further replies.

ringadeal

Technical User
Jan 16, 2008
67
US
I have the following javascript function call inside of my asp code:
Code:
onmouseover="showBigImage( 'imagescript.asp?path=<%= images("url_img") %>&amp;width=250','<%= images("url_img") %>','<%= images("alt_img")%>')
I would like to know how to go about placing a variable instead of images("alt_img").

Something to this effect:
Code:
dim caption
caption= images("alt_img")
Where would I stick the above code and how would I stick the variable into the javascript function call code?
 
I would do something like:

Code:
<%

dim caption, location
caption= images("alt_img")
location = images("url_img")
 
response.write "onmouseover = showBigImage ( 'imagescript.asp?path=" & caption & "&amp;width=250','" & location & "','" & caption & "')"
%>

I'm quite sure I didn't escape something in there correctly but that should get you moving in the right direction.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top