473,406 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

236 100+
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


Expand|Select|Wrap|Line Numbers
  1.  
  2. Expand|Select|Wrap|Line Numbers <div class="centerBoxContentsNew centeredContent back" style="width:33%;"><a href="01.jpg"><img  
  3.  
  4. src="02.JPG" alt="RHB_CNLIN0003-SILVER" title="" width="60" height="80" style="position:relative"  
  5.  
  6. onmouseover="showtrail('02.jpg','RHB_CNLIN0003-SILVER',60,80,187,249,this,0,0,60,80);"  
  7.  
  8. onmouseout="hidetrail();"  /></a><br /><a href="01.jpg">RHB_CNLIN0003-SILVER</a><br />US$15.00</div> 
  9. <br class="clearBoth" /> 
  10.  
  11.  
Nov 3 '08 #1
6 4835
KevinADC
4,059 Expert 2GB
This question has nothing to do with perl and should be directed to the proper forum, the html or javascripting forum.
Nov 3 '08 #2
happyse27
236 100+
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


Expand|Select|Wrap|Line Numbers
  1. <div class="centerBoxContentsNew centeredContent back" style="width:33%;"><a href="0001.jpg"><img   
  2.  
  3. src="0001.jpg" alt="RHB_CNLIN0003-SILVER" title="" width="60" height="80" style="position:relative"   
  4.  
  5.  
  6. onmouseout="hidetrail();"  /></a><br /><a href="0002.jpg">RHB_CNLIN0003-SILVER</a><br />US$15.00</div>  
  7. <br class="clearBoth" />  
  8.  
  9.  
Nov 3 '08 #3
KevinADC
4,059 Expert 2GB
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.
Nov 3 '08 #4
happyse27
236 100+
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...
==============================

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html> 
  3.    <head> 
  4.      <script src="d:testjava-mod.js"> 
  5.      </script>   
  6.  
  7.    </head> 
  8.  
  9.    <body>
  10.    </body>
  11. </html>
  12.  
  13.  

javascript(changed to d drive from perl default script directory still cannot activate script)
========
Expand|Select|Wrap|Line Numbers
  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Java Popup Window Example with size, title and background colour parameters</TITLE>
  5. <script language="JavaScript1.2" type="text/javascript">
  6. <!-- ;
  7. var newwindow;
  8. var wheight = 0, wwidth = 0;
  9.  
  10. function popitup5(url, title, iwidth, iheight, colour) {
  11. var pwidth, pheight;
  12.  
  13. if ( !newwindow || newwindow.closed ) {
  14. pwidth=iwidth+30;
  15. pheight=iheight+30;
  16. newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
  17. wheight=iheight;
  18. wwidth=iwidth;
  19. }
  20.  
  21. if (wheight!=iheight || wwidth!=iwidth ) {
  22. pwidth=iwidth+30;
  23. pheight=iheight+90;
  24. newwindow.resizeTo(pwidth, pheight);
  25. wheight=iheight;
  26. wwidth=iwidth;
  27. }
  28.  
  29. newwindow.document.clear();
  30. newwindow.focus();
  31. newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
  32. newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
  33. newwindow.document.writeln('<\/center> <\/body> <\/html>');
  34. newwindow.document.close();
  35. newwindow.focus();
  36. }
  37.  
  38. // Routines to tidy up popup windows when page is left
  39. // Call with an onUnload="tidy5()" in body tag
  40.  
  41. function tidy5() {
  42. if (newwindow && !newwindow.closed) { newwindow.close(); }
  43. }
  44.  
  45. // Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
  46. </script>
  47.  
  48.  
  49. </HEAD> 
  50.  
  51. <BODY onUnload="tidy5()" > 
  52.  
  53. <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> 
  54.  
  55. </BODY>
  56. </HTML>
  57.  
Nov 4 '08 #5
happyse27
236 100+
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...
==============================

Expand|Select|Wrap|Line Numbers
  1.  
  2. <html> 
  3.    <head> 
  4.      <script src="d:testjava-mod.js"> 
  5.      </script>   
  6.  
  7.    </head> 
  8.  
  9.    <body>
  10.    </body>
  11. </html>
  12.  
  13.  

javascript(changed to d drive from perl default script directory still cannot activate script)
========
Expand|Select|Wrap|Line Numbers
  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Java Popup Window Example with size, title and background colour parameters</TITLE>
  5. <script language="JavaScript1.2" type="text/javascript">
  6. <!-- ;
  7. var newwindow;
  8. var wheight = 0, wwidth = 0;
  9.  
  10. function popitup5(url, title, iwidth, iheight, colour) {
  11. var pwidth, pheight;
  12.  
  13. if ( !newwindow || newwindow.closed ) {
  14. pwidth=iwidth+30;
  15. pheight=iheight+30;
  16. newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10');
  17. wheight=iheight;
  18. wwidth=iwidth;
  19. }
  20.  
  21. if (wheight!=iheight || wwidth!=iwidth ) {
  22. pwidth=iwidth+30;
  23. pheight=iheight+90;
  24. newwindow.resizeTo(pwidth, pheight);
  25. wheight=iheight;
  26. wwidth=iwidth;
  27. }
  28.  
  29. newwindow.document.clear();
  30. newwindow.focus();
  31. newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
  32. newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >');
  33. newwindow.document.writeln('<\/center> <\/body> <\/html>');
  34. newwindow.document.close();
  35. newwindow.focus();
  36. }
  37.  
  38. // Routines to tidy up popup windows when page is left
  39. // Call with an onUnload="tidy5()" in body tag
  40.  
  41. function tidy5() {
  42. if (newwindow && !newwindow.closed) { newwindow.close(); }
  43. }
  44.  
  45. // Based on JavaScript provided by Peter Curtis at www.pcurtis.com -->
  46. </script>
  47.  
  48.  
  49. </HEAD> 
  50.  
  51. <BODY onUnload="tidy5()" > 
  52.  
  53. <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> 
  54.  
  55. </BODY>
  56. </HTML>
Nov 4 '08 #6
KevinADC
4,059 Expert 2GB
This is getting more like tech support and a lot less like helping you with perl questions.
Nov 4 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Keiron Waites | last post by:
Hi, Is there any JavaScript that can force the download of an image or a list of images before the HTML, or any other images are downloaded? This is necessary so I can force the background image...
1
by: Julia Briggs | last post by:
Hello, is there anyway to insert an image on any particular <select> option line in a drop down list without using a specialty drop-down? Any good ones out there that can be made to resemble a...
23
by: Erik Schulp | last post by:
Hi all, I am using a background image via a stylsheet. I've used this code: background-image:url("/images/tile.gif"); (which I think is correct) The image doesn't show up however, the path,...
10
by: Imran | last post by:
Hi, I am attempting to create a CSS-driven website, in that I want to be able to control the display/content from the CSS file. I do not want to use tables. On a page, I have a background...
24
by: TC | last post by:
Hi folks I want to enhance my website to distinguish "external" hyperlinks from "internal" ones. With that aim, I've written the following two small files for testing purposes: ...
3
by: Paul | last post by:
I want the <div id="navigation"column to be the same color all the way to the bottom. The "background-image: url(bg_menu_tile.gif);" was a try to force it with a long 1-pixel graphic - didn't...
1
by: alokw | last post by:
Hi everyone, Here's my problem. I'd like to revamp my web site, and I have this idea. I want to create essentially a border around the screen of about 100 pixels of just black. Heres where...
0
by: tom59593 | last post by:
Hi there. I have been attempting (for a few days on end, sadly) to get a navigation section of my new site to work. Granted, this is the first time I've ever written CSS...although I had PLENTY of...
2
by: thephatp | last post by:
I'm having a problem with IE rendering correctly. I'm experimenting with using all div's in my pages now, and I'm not very familiar with the quirks of IE. I have created a sample page, and I'm...
3
by: jrod11 | last post by:
Hi everyone, I'm working on creating a company intranet or my company and having trouble with IE. I have a navigation bar at the bottom of my page that is a quick links bar and is a fixed...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.