Subject: onMouseOver expand image in popup
Posted By: sanjeev jha Post Date: 6/2/2008 10:19:03 PM
i have some frame top, bottom,left,right. Some pictures are displaying in right frame. my need to expand image in new window on mouse over from slide show, like this link
http://p2p.wrox.com/default.asp?Snitz00HideCat22=N#category22 br /
yes reduce the actual size in slide show

<img src="images/1.jpg" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image">


sanjeev
Reply By: sanjeev jha Reply Date: 6/4/2008 6:04:21 AM
Hi
i got it working by using this code


<script type="text/javascript">

var my_window;
function new_window(ImageURL1) { 
my_window = window.open(ImageURL1, 'new', 'height=400,left=10,top=10'); 
  } 
function close_window() { 
  my_window.close(); 
  } 
</script> 
<img src="images/1.jpg" onmouseover="new_window(this.src)" onMouseOut="close_window()" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170px"  height="140px"  title="Click to Magnifying Image">


sanjeev
Reply By: vinod_yadav1919 Reply Date: 6/4/2008 3:11:34 PM
Hi Sanjeev!!
 
Also try to check whether the popup window is already closed by clicking the "X" button on window..,if user does this ,my_window.close() will not work ..
so its a best practice to check whether the object/window is null or undefined  before performaing any action on it..


Cheers :)

vinod

Go to topic 71881

Return to index page 1