Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 2nd, 2008, 10:19 PM
Authorized User
 
Join Date: Nov 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sanjeev jha
Default onMouseOver expand image in popup

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?Snit...tegory22<br />
yes reduce the actual size in slide show
Code:
<img src="images/1.jpg" name='SlideShow' border="5px" style="border-color:#B812A7 " width="170PX" height="140PX" title="Magnifying Image">
sanjeev
__________________
sanjeev
 
Old June 4th, 2008, 06:04 AM
Authorized User
 
Join Date: Nov 2007
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sanjeev jha
Default

Hi
i got it working by using this code

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
 
Old June 4th, 2008, 03:11 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in mouseover and popup enlarge image kumiko Javascript 0 March 28th, 2008 03:04 AM
Gallery Image display in popup Window caitydev ASP.NET 1.0 and 1.1 Basics 3 April 3rd, 2006 10:23 AM
Help to expand a working query mat41 SQL Language 6 February 10th, 2005 05:10 AM
Popup image loader[?] sankar Javascript How-To 2 July 22nd, 2003 06:56 AM
Expand/Collapse Data rafstar Classic ASP Basics 4 June 8th, 2003 10:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.