IT Community - Software Programming, Web Development and Technical Support

How to open popup onmouseover and to close the same window onmouseout javascript?

This is a discussion on How to open popup onmouseover and to close the same window onmouseout javascript? within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; How to open popup onmouseover and to close the same window onmouseout using javascript?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > HTML, CSS and Javascript Coding Techniques

Register FAQ Members List Calendar Mark Forums Read
  6 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-19-2007, 11:15 PM
bluesky bluesky is offline
D-Web Analyst
 
Join Date: Jun 2007
Posts: 201
bluesky is on a distinguished road
Default How to open popup onmouseover and to close the same window onmouseout javascript?

How to open popup onmouseover and to close the same window onmouseout using javascript?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-20-2007, 12:55 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to open popup onmouseover and to close the same window onmouseout javascript?

Declare a global variable myWin;

<SCRIPT language="JavaScript">
var myWin;
function openWin(fileName)
{
myWin = window.open('filename', 'filename', "attributes");
}
function closeWin()
{
myWin.close();
}
</SCRIPT>

<a href="javascript:void(0)" onMouseOver="javascript: openWin('myFile.html')" onMouseOut="javascript:closeWin()">Move the mouse</a>

Last edited by oxygen : 07-20-2007 at 12:57 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-17-2007, 07:17 AM
H2o H2o is offline
D-Web Analyst
 
Join Date: Jul 2007
Posts: 246
H2o is on a distinguished road
Default Re: How to open popup onmouseover and to close the same window onmouseout javascript?

Hi

I have using Image mouse over efect via javascript, it's working fine, but display the image was very slow.. pls gimme any idea


thanks
__________________
H2O

Without us, no one can survive..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-07-2007, 06:51 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Smile Re: How to open popup onmouseover and to close the same window onmouseout javascript?

<html>
<title>CodeAve.com(javascript: Hover
Window within Previous Page)</title>
<body bgcolor="#FFFFFF">

<script language="JavaScript">
<!--
// This is the function that will open the
// new window when the mouse is moved over the link
function open_new_window()
{
new_window = open("","hoverwindow","width=300,height=200,left=1 0,top=10");

// open new document
new_window.document.open();

// Text of the new document
// Replace your " with ' or \" or your document.write statements will fail
new_window.document.write("<html><title>JavaScript New Window</title>");
new_window.document.write("<body bgcolor=\"#FFFFFF\">");
new_window.document.write("This is a new html document created by JavaScript ");
new_window.document.write("statements contained in the previous document.");
new_window.document.write("<br>");
new_window.document.write("</body></html>");

// close the document
new_window.document.close();
}

// This is the function that will close the
// new window when the mouse is moved off the link
function close_window()
{
new_window.close();
}

// -->
</script>


<a href="#" onMouseOver="open_new_window()" onMouseOut="close_window()">Open Hover Window</a>




</body>
</html>
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/html-css-javascript-coding-techniques/2264-how-open-popup-onmouseover-close-same-window-onmouseout-javascript.html
Posted By For Type Date
Digg / Programming / Upcoming This thread Refback 07-20-2007 05:23 AM
Digg / Technology / Upcoming This thread Refback 07-20-2007 05:04 AM
Digg / Programming / Upcoming This thread Refback 07-20-2007 02:08 AM
Digg - popup mouseover and mouseout - cool trick This thread Refback 07-20-2007 01:23 AM
Digg / Technology / Upcoming This thread Refback 07-20-2007 01:23 AM
Digg / News / Upcoming This thread Refback 07-20-2007 01:22 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session never expires in site unless you close the window ursklakshmanan PHP Programming 1 03-31-2008 03:07 AM
How to pass session values in popup window Mramesh HTML, CSS and Javascript Coding Techniques 3 03-13-2008 09:01 PM
Need to close parent window after closing child window. S.Vinothkumar ASP and ASP.NET Programming 6 11-05-2007 06:08 AM
Is it possible to close the parent window (main web browser window) from a child win gp_logesh HTML, CSS and Javascript Coding Techniques 1 10-29-2007 04:53 AM
How to open and close browser in silk test senthilkannan Testing Tools 0 07-30-2007 03:35 AM


All times are GMT -7. The time now is 12:55 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0