Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


JavaScript Windows

The open() call takes these arguments:

  1. URL of a page to be displayed in it.
  2. The name to be given to the window.
  3. A list of properties, selected from
    • directories: yes|no
    • height: number of pixels
    • location: yes|no
    • menubar: yes|no
    • resizable: yes|no
    • scrollbars: yes|no
    • status: yes|no
    • toolbar: yes|no
    • width: number of pixels

Opening a New Window by Button

The openStars() function is simply
function openStars() { open("/"); }

Opening a New Window by Link

Menu Window
function makeRemote() {
	remote = window.open("","remotewin",
			"width=600,height=135");
	remote.location.href = "YOUR_MENU.html";
	if (remote.opener == null)
			remote.opener = window;
	remote.opener.name = "opener";
	}
in the HEAD, and in the link:-
<a href="javascript:makeRemote()">Menu Window</a>
See also The Universal Remote.

Dynamic Creation of Window Content

I'd be back in the UK if it wasn't for the 6-month pet quarantine.

In the HEAD this is:

function popUp() {
    myWin= open("", "displayWindow",
    		"width=200,height=100");
    // open document for further output
    myWin.document.open();
    // create document
    myWin.document.write("<html><head><title>Acronym");
    myWin.document.write("</title></head><body>");
    myWin.document.write("UK:	United Kingdom");
    myWin.document.write("</body></html>");
    // close the document - (not the window!)
    myWin.document.close();
    }
And in the BODY:
<a  href	= "javascript:popUp()"
    onMouseOver	="window.status='United Kingdom';  
    			return true"
    onMouseOut	="window.status='';
    			return true"
    >
    UK</a>

For more on this, see VOODOO'S INTRODUCTION TO JAVASCRIPT: Part 4: Windows and on-the-fly documents.



Up to => Home / Authoring / JavaScript




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers