how to pop out same image without html from html background...

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

    how to pop out same image without html from html background...

    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. And I wanted to use this in perl, not sure if it is workable?


    Thanks in advance,
    Andrew


    Code:
    Expand|Select|Wrap|Line Numbers <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" />
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    This question has nothing to do with perl and should be directed to the proper forum, the html or javascripting forum.

    Comment

    • happyse27
      New Member
      • Sep 2008
      • 236

      #3
      Hi Kevin,

      Thanks again... I resolved the code except for I could not let it pop on windows by itself, it popped out in separate html page.

      Also, I want to check if the below html can incorporate into Perl and how?? As the code seemed to be Java based??


      Thanks and Best Rgds,
      Andrew


      Code:
      <div class="centerBoxContentsNew centeredContent back" style="width:33%;"><a href="0001.jpg"><img   
        
      src="0001.jpg" alt="RHB_CNLIN0003-SILVER" title="" width="60" height="80" style="position:relative"   
        
        
      onmouseout="hidetrail();"  /></a><br /><a href="0002.jpg">RHB_CNLIN0003-SILVER</a><br />US$15.00</div>  
      <br class="clearBoth" />

      Comment

      • KevinADC
        Recognized Expert Specialist
        • Jan 2007
        • 4092

        #4
        You put it into perl code the same way you are putting all html code into your perl script. It looks like javascript, not java.

        Comment

        • happyse27
          New Member
          • Sep 2008
          • 236

          #5
          Hi Kevin / All,

          I tried to incorporate Java script into html and perl as pop up screen in html from my picture but cant work, not sure what is the issue??? The main html page which supposed to activate the perl script showed blank...


          Thanks in advance again,
          Andrew


          Hi all,

          I have enabled Javascripting in internet explorer 7, and I have been writing script in perl.

          The thing I cant do now is to pop up image in small html frame from main html page.... The result of the main html showed blank. Any idea?


          Thanks and Best Rgds,
          Andrew


          a) html script - not sure if the directory perl is correct, put into cgi-bin directory in perl but cant work, so put into d drive...
          =============== ===============

          Code:
          <html> 
             <head> 
               <script src="d:testjava-mod.js"> 
               </script>   
          
             </head> 
          
             <body>
             </body>
          </html>

          javascript(chan ged to d drive from perl default script directory still cannot activate script)
          ========
          Code:
          <HTML>
          <HEAD>
          <TITLE>Java Popup Window Example with size, title and background colour parameters</TITLE>
          <script language="JavaScript1.2" type="text/javascript">
          <!-- ;
          var newwindow;
          var wheight = 0, wwidth = 0;
          
          function popitup5(url, title, iwidth, iheight, colour) {
          var pwidth, pheight;
          
          if ( !newwindow || newwindow.closed ) {
          pwidth=iwidth+30;
          pheight=iheight+30;
          newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
          wheight=iheight;
          wwidth=iwidth;
          }
          
          if (wheight!=iheight || wwidth!=iwidth ) {
          pwidth=iwidth+30;
          pheight=iheight+90;
          newwindow.resizeTo(pwidth, pheight);
          wheight=iheight;
          wwidth=iwidth;
          }
          
          newwindow.document.clear();
          newwindow.focus();
          newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
          newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
          newwindow.document.writeln('<\/center> <\/body> <\/html>');
          newwindow.document.close();
          newwindow.focus();
          }
          
          // Routines to tidy up popup windows when page is left
          // Call with an onUnload="tidy5()" in body tag
          
          function tidy5() {
          if (newwindow && !newwindow.closed) { newwindow.close(); }
          }
          
          // Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
          </script>
          
          
          </HEAD> 
          
          <BODY onUnload="tidy5()" > 
          
          <A HREF="javascript:popitup5('d:0002.jpg','Temple of Heavenly Bliss', 384, 288,'white')"><IMG SRC="d:0002.jpg" WIDTH="160" BORDER="0" HEIGHT="120" HSPACE="10" VSPACE="5" ALT="Temple of Heavenly Bliss" TITLE="Temple of Heavenly Bliss" ALIGN=left></A> 
          
          </BODY>
          </HTML>
          Last edited by eWish; Nov 5 '08, 03:28 AM. Reason: Fixed code tags

          Comment

          • happyse27
            New Member
            • Sep 2008
            • 236

            #6
            Hi Kevin / All,

            I tried to incorporate Java script into html and perl as pop up screen in html from my picture but cant work, not sure what is the issue??? The main html page which supposed to activate the java script in perl cgi-bin directory showed blank, changed the javascript to drive with the picture, still cant. Please kindly see below.


            Thanks in advance again,
            Andrew


            Hi all,

            I have enabled Javascripting in internet explorer 7, and I have been writing script in perl.

            The thing I cant do now is to pop up image in small html frame from main html page.... The result of the main html showed blank. Any idea?


            Thanks and Best Rgds,
            Andrew


            a) html script - not sure if the directory perl is correct, put into cgi-bin directory in perl but cant work, so put into d drive...
            =============== ===============

            Code:
            <html> 
               <head> 
                 <script src="d:testjava-mod.js"> 
                 </script>   
            
               </head> 
            
               <body>
               </body>
            </html>

            javascript(chan ged to d drive from perl default script directory still cannot activate script)
            ========
            Code:
            <HTML>
            <HEAD>
            <TITLE>Java Popup Window Example with size, title and background colour parameters</TITLE>
            <script language="JavaScript1.2" type="text/javascript">
            <!-- ;
            var newwindow;
            var wheight = 0, wwidth = 0;
            
            function popitup5(url, title, iwidth, iheight, colour) {
            var pwidth, pheight;
            
            if ( !newwindow || newwindow.closed ) {
            pwidth=iwidth+30;
            pheight=iheight+30;
            newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
            wheight=iheight;
            wwidth=iwidth;
            }
            
            if (wheight!=iheight || wwidth!=iwidth ) {
            pwidth=iwidth+30;
            pheight=iheight+90;
            newwindow.resizeTo(pwidth, pheight);
            wheight=iheight;
            wwidth=iwidth;
            }
            
            newwindow.document.clear();
            newwindow.focus();
            newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
            newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
            newwindow.document.writeln('<\/center> <\/body> <\/html>');
            newwindow.document.close();
            newwindow.focus();
            }
            
            // Routines to tidy up popup windows when page is left
            // Call with an onUnload="tidy5()" in body tag
            
            function tidy5() {
            if (newwindow && !newwindow.closed) { newwindow.close(); }
            }
            
            // Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
            </script>
            
            
            </HEAD> 
            
            <BODY onUnload="tidy5()" > 
            
            <A HREF="javascript:popitup5('d:0002.jpg','Temple of Heavenly Bliss', 384, 288,'white')"><IMG SRC="d:0002.jpg" WIDTH="160" BORDER="0" HEIGHT="120" HSPACE="10" VSPACE="5" ALT="Temple of Heavenly Bliss" TITLE="Temple of Heavenly Bliss" ALIGN=left></A> 
            
            </BODY>
            </HTML>
            Last edited by eWish; Nov 5 '08, 03:28 AM. Reason: Fixed code tags

            Comment

            • KevinADC
              Recognized Expert Specialist
              • Jan 2007
              • 4092

              #7
              This is getting more like tech support and a lot less like helping you with perl questions.

              Comment

              Working...