none
pop up image on rollover RRS feed

  • Question

  • I have a web page that displays images from a database selected by the user. I want to display a larger image on a mouse rollover.

    I have some code that works fine in HTML for both Firefox and IE. I have experimented putting this code together with the results from the database search. This works fine with Firefox but not with IE.

    The code is:

    <a class="thumbnail" href="#thumb"
                <asp:image id="Image1" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="61px" Width="76px" /><span><asp:image id="Image2" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="200px" Width="300px" /><br />Large pop up</span></a>

    The problem is something to do with the <a tag but I am not sure how to correct this. (I have not included the CSS as this would clutter up the posting)

    Can anyone help?
    Friday, July 23, 2010 8:36 AM

Answers

  • There is no closing angle bracket on the <a .. > tag:

    Should be:
    <a class="thumbnail" href="#thumb">
               <asp:image id="Image1" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="61px" Width="76px" /><span><asp:image id="Image2" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="200px" Width="300px" /><br />Large pop up</span></a>

    though I cannot imagine why you would place a thumbnail (with a file size the same as the large image) and a large image side by side in a link to a bookmark.

    Perhaps links to the faulty page and to the page that works (in "pure" HTML) would explain the confusion.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    Friday, July 23, 2010 2:57 PM
  • Hi to both of you,

    Many thanks for your replies.

    I had put the page on the web site and then received the reply about the closing '>' and that fixed it.

    Regarding the "though I cannot imagine why...." the answer is that this is a steep learning curve and I try and work from code that does work and then adapt it, bit by bit to my requirements, just to get basic principles working. The code presented is just part of the learning process, and is not what I want ultimately, but it now that it worksI can now adapt it to what I want.

    Many thanks to both of you, that was extremley helpful.

    Andrew

     

    • Marked as answer by Andrew369 Friday, July 23, 2010 6:51 PM
    Friday, July 23, 2010 6:50 PM

All replies

  • Give us a link to your web page please.
    Friday, July 23, 2010 2:12 PM
  • There is no closing angle bracket on the <a .. > tag:

    Should be:
    <a class="thumbnail" href="#thumb">
               <asp:image id="Image1" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="61px" Width="76px" /><span><asp:image id="Image2" runat="server" ImageUrl='<%# Eval("Photo1", "images/{0}") %>' Height="200px" Width="300px" /><br />Large pop up</span></a>

    though I cannot imagine why you would place a thumbnail (with a file size the same as the large image) and a large image side by side in a link to a bookmark.

    Perhaps links to the faulty page and to the page that works (in "pure" HTML) would explain the confusion.


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    Friday, July 23, 2010 2:57 PM
  • Hi to both of you,

    Many thanks for your replies.

    I had put the page on the web site and then received the reply about the closing '>' and that fixed it.

    Regarding the "though I cannot imagine why...." the answer is that this is a steep learning curve and I try and work from code that does work and then adapt it, bit by bit to my requirements, just to get basic principles working. The code presented is just part of the learning process, and is not what I want ultimately, but it now that it worksI can now adapt it to what I want.

    Many thanks to both of you, that was extremley helpful.

    Andrew

     

    • Marked as answer by Andrew369 Friday, July 23, 2010 6:51 PM
    Friday, July 23, 2010 6:50 PM