spacer
Yehuda Shiran October 8, 2001
Creating Popup Windows
Tips: October 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
One easy way to create tool tips is by using the popup window. You can control its size, location, style, and innerHTML. You can use its style object to specify the backgroundColor, border, fontSize, and fontFamily. Try this popup window. Find it somewhere in the upper left corner of your desktop. Click anywhere to get rid of the popup window. Here is how we define it:

<SCRIPT LANGUAGE="JavaScript">
<!--
  var oPopup = window.createPopup();
  oPopupBody = oPopup.document.body;
  oPopupBody.innerHTML = "Hello There";
  oPopupBody.style.backgroundColor = "#ffff66";
  oPopupBody.style.border = "1 solid black";
  oPopupBody.style.fontSize = "12px";
  oPopupBody.style.fontFamily = "Courier New";
// -->
</SCRIPT>
And here is how we call it in the above "Try" link:

  oPopup.show(100, 200, 100, 20);
You prepare the object off line, as shown above, and then display it with the show() method. This method has four parameters:

  show(x-location, y-location, width, height);
The coordinates are relative to the top left corner of your desktop.

This tip is relevant to Internet Explorer 5.5 and above.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering MySQL Databases on the Web Using PHP · Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
So what is an Oracle Nested Table? · E-Discovery Architectures 101 · eBay Embraces Big Sellers, Cyber Monday Trends