Development| HTML| JavaScript| Questions?

 

 

 

 

 

 

 

 

 

 

 

 

 

Search Tutorials

Latest Questions
Comments
 
JavaScript createPopup method 
 

In our this part of JavaScript methods we will describe you how you can create a popup window by using the simple JavaScript in an HTML page.

 

JavaScript createPopup method

                         

In our this part of JavaScript methods we will describe you how you can create a popup window by using the simple JavaScript in an HTML page. We have used here the createPopup() method of JavaScripts to create the popup window.

Syntax: 

 window.createPopup();

Description of code:

In the following example code we have created a simple html page and we have added a simple button in this html page. On the button we have applied the javascript's code for the visual appearance of the Popup window. As soon as we carry our mouse pointer over the button it calls the popup.show() and on mouse pointer out it will hide the popup window.  Here is the full example code of poppedexample.html as follows:

poppedexample.html

<html>
 <head>
  <title>PopUp example</title>
    <script language="JavaScript">
	function write(){
		document.write("Button clicked");
	}
		var popup = window.createPopup();
		popup.document.body.innerHTML = 'Popup button';
		popup.document.body.style.backgroundColor =
               '#ffffcc';
    </script>
  </head>
    <body>
      <br>
        <input type="button" onClick="write();"
          onmouseover="popup.show(0, 0, 200, 50, document.body);" 
          onmouseout="popup.hide();" 
          value="Simple Button">
    </body>
</html>

Output :

When you will take your mouse pointer on the button "Simple Button" it will show the pop up box over the button. It will look like as follows:

Download Source Code

                         

» View all related tutorials
Related Tags: java javascript c attributes script reference object method sed remove ip attribute node move nat to ref e it alter

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Training Courses
Tell A Friend
Your Friend Name
Software Solutions
Least Viewed
Most Rated
Recently Viewed
Search Tutorials

 

 
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Indian Software Development Company | iPhone Development Company in India | Flex Development Company in India | Java Training Delhi | Java Training at Noida |

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2008. All rights reserved.