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?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| 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. |
| |||
| 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.. |
| |||
| <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> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
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 |