Displaying images in same page

C

carmen

I am trying to convert the following line
Response.Write "<a href=" & imageFilePath & strPicArray(0,x) & "><img
src=" & thumbFilePath & strPicArray(0,x) & "width=""75"" height=""75""></a>"
to something like this
<li><a href="images/heron.gif" onclick="return wrapContent(event, this.href,
400, 400)">link 2</a></li>
when I change the second line to this
Response.Write "<li><a href='"& thumbFilePath & strPicArray(0,x)
&"'"onclick="'"return wrapContent(event, this.href, 106, 131)"'>><img src='"
& thumbFilePath & strPicArray(0,x) & "'width=""75"" height=""75""></a></li>"

I get errors stating Expected end of statement. I'm trying to learn but am
getting stumped on this.
Thanks for any comments that will help

C.
 
R

Ray Costanzo [MVP]

Did you miss my answer in your other thread about this from
yesterday?

Ray at work

carmen said:
I am trying to convert the following line
Response.Write "<a href=" & imageFilePath & strPicArray(0,x) & "><img
src=" & thumbFilePath & strPicArray(0,x) & "width=""75""
 
C

carmen

I saw your answer and I was able to get it to work. Thanks for the help. I
am now trying to convert it to display another way. I thought I understood
but I confused on writing the output another way.
 
R

Ray Costanzo [MVP]

I can see why you're confused. That string is disorienting. :]
Let's try simplifying things by breaking it into pieces. You can
then glue it all back together after the fact if you desire.


Response.Write "<li>"
Response.Write "<a href=""images/heron.gif"" "
Response.Write "onclick=""return wrapContent(event, this.href,400,
400)"""
Response.Write ">link 2</a></li>"

Again though, why Response.Write this at all? Why not just write the
HTML?


%> <--- Note that we're OUT of ASP block [---------
<li><a href="<%=thumbFilePath & strPicArray(0,x)%>" onclick="return
wrapContent(event, this.href, 106, 131)">
<img src="<%=thumbFilePath & strPicArray(0,x)%>" width="75"
height="75"></a></li>

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top