Notes from the May 2003 Meeting: Opening new browser windows
HTML to open link in a new browser window.
<a href="URL" target="_blank">TEXT</a>Multiple uses with different links open new browser windows for each link.
HTML to open link in a new, named browser window.
<a href="URL" target="_windowname">TEXT</a>Repeat with multiple links, and they will open in the same new window instead of opening multiple windows.
Mix and match window names to define where a specific link will open. For instance, the first two links below would open in one window, and the third would open in a new window:
<a href="http://www.yahoo.com" target="_window1">Yahoo</a>
<a href="http://www.cnn.com" target="_window1">CNN</a>
<a href="http://www.pacsnet.org" target="_window2">PACS</a>
Javascript for a "Close Window" button.
Put the below within <Body> container.Simple text link:
<a href="javascript:window.close()">Close Window</a>
Button options:
FIRST:
< form>
<div align="left">
<input type="button" value="Close Window" onClick="window.close()">
</div>
< /form>
SECOND:
<form name="closeIt">
< input type="button" value="Close" onClick="window.close()">
< /form>
Javascript to control behavior of new browser window.
General:<a href="#" onClick="MyWindow=window.open('http://www.yahoo.com','MyWindow',
'toolbar=no,
location=no,
directories=no,
status=no,
menubar=no,
scrollbars=yes,
resizable=yes,
width=500,
height=400,
left=300,
top=150');
return false;">
open window</a>
Links for more information:
http://www.usc.edu/dept/matrix/clerc/html/javascript3.html
http://www.fontstuff.com/frontpage/fptut06.htm
Wizards to create code:
http://www.blooberry.com/indexdot/html/topics/windowopen.htm
http://java-script.4t.com/wintool.htm
