Displaying images in same page

Discussion in 'ASP General' started by carmen, Dec 28, 2004.

  1. carmen

    carmen Guest

    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.
     
    carmen, Dec 28, 2004
    #1
    1. Advertising

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

    Ray at work

    "carmen" <carmen@iyahoo_Spam.com> wrote in message
    news:Ov%...
    > 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.
    >
    >
     
    Ray Costanzo [MVP], Dec 28, 2004
    #2
    1. Advertising

  3. carmen

    carmen Guest

    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.


    "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
    message news:...
    > Did you miss my answer in your other thread about this from
    > yesterday?
    >
    > Ray at work
    >
     
    carmen, Dec 28, 2004
    #3
  4. 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









    "carmen" <carmen@iyahoo_Spam.com> wrote in message
    news:...
    > 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.
    >
    >
    > "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial>

    wrote in
    > message news:...
    > > Did you miss my answer in your other thread about this from
    > > yesterday?
    > >
    > > Ray at work
    > >

    >
    >
     
    Ray Costanzo [MVP], Dec 28, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Slaphead
    Replies:
    6
    Views:
    404
    Starshine Moonbeam
    Sep 11, 2004
  2. hplayer03

    Displaying Images on a page

    hplayer03, Aug 14, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    323
    Alexey Smirnov
    Aug 14, 2007
  3. Just Me
    Replies:
    2
    Views:
    538
    John Mott
    Sep 4, 2007
  4. Cruithne3753
    Replies:
    3
    Views:
    448
    Roedy Green
    Feb 11, 2008
  5. Cruithne3753
    Replies:
    3
    Views:
    1,664
    Cruithne3753
    Feb 12, 2008
Loading...

Share This Page