how pop up another image in the html by clicking certain image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • happyse27
    New Member
    • Sep 2008
    • 236

    how pop up another image in the html by clicking certain image

    Hi All,

    I have this html code below. Just like to check what is a good way to pop up an same image of its own(without new html page, but an image on top of current html page) by click on the image of the original html page?

    Sample code is below.


    Thanks in advance,
    Andrew



    Code:
    <div class="centerBoxContentsNew centeredContent back" style="width:33%;"><a href="01.jpg"><img 
    
    src="02.JPG" alt="RHB_CNLIN0003-SILVER" title="" width="60" height="80" style="position:relative" 
    
    onmouseover="showtrail('02.jpg','RHB_CNLIN0003-SILVER',60,80,187,249,this,0,0,60,80);" 
    
    onmouseout="hidetrail();"  /></a><br /><a href="01.jpg">RHB_CNLIN0003-SILVER</a><br />US$15.00</div>
    <br class="clearBoth" />
  • happyse27
    New Member
    • Sep 2008
    • 236

    #2
    Hi All,

    I got from the code above error : object expected line : 3 character 1 code 0 from internet explorer 7. There seemed to be problem with the internet explorer although i have did windows update.

    Kindly enlighten...


    Cheers...
    Andrew

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      #3
      That is a JavaScript error. This does seem to be a JavaScript problem. If you want to avoid JavaScript and use CSS alone, use :hover

      Comment

      • happyse27
        New Member
        • Sep 2008
        • 236

        #4
        Hi Sir,

        I dont want it to hover, I saw the URL. I just wanted pop out the image without any html background. Thanks.


        Thanks and Best Rgds,
        Andrew

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          It would be easiest with JavaScript, though you could possibly put something together with CSS. Do you want to avoid JavaScript at all costs? If not, I would recommend JavaScript and from the code in your first post, it seems JavaScript is being used anyway.

          If you're going to use JavaScript, I'll move this thread to the JavaScript for you.

          Comment

          • happyse27
            New Member
            • Sep 2008
            • 236

            #6
            Hi Sir,

            I saw this, not sure if got any alternative to use just html? But the web development tool I use is perl.


            Thanks,
            Andrew

            Comment

            • acoder
              Recognized Expert MVP
              • Nov 2006
              • 16032

              #7
              In that case, JavaScript would be your best bet. Moved thread to the JavaScript forum.

              Note that JavaScript, HTML, CSS, etc. are all client-side while Perl is server-side.

              To show an image within the browser window by clicking on a certain image, you would need to add some code that is triggered onclick (not onmouseover as you have it in the sample code). You can use an image gallery script if you want. Can you show some more of the code that you have?

              Comment

              Working...