This
simple script allows you make any url open in to a
pop up box. You can easily define the size of the window TOOLBAR,
MENUBAR, LOCATION RESIZABLE, SCROLLBARS, by using YES or NO. Width
and height by changing the numbers with are pixel sizes.
<head>
<script language=JAVASCRIPT>
<!--
function openWindow(theURL, theTitle, theOptions) { //v1.0
var win = window.open(theURL,theTitle,theOptions); return false;
}
// -->
</script>
</head>
<body>
Place this remaining function as shown on the url
you want to open into a pop up window.
<a href="http://www.kickasp.com
"onClick='
return openWindow("http://www.kickasp.com","kickasp","
TOOLBAR=YES,MENUBAR=YES,LOCATION=YES,
RESIZABLE=YES,SCROLLBARS=YES,WIDTH=650,
HEIGHT=300")'> Kick ASP Custom Store Front</a>
</body>
The
only known problem with this script is the spacing in the body tag
part of the script. When using it in the document make sure there
are no extra spaces and keep the entire tag on one line in your
html. Don't worry it will fit anywhere.
You
can also insert an image along with the hyperlink url. Just before
before the </a> insert something like this <img src="my_image.gif"
width="125" height="125" alt="my image" border="0"> Be sure to
use the border tag or it will produce a blue ring around the image
in the Netscape browser's not pretty.
This
script opens a perfect window centered in any browser. This to
has two parts one the goes between the head tags and the other
part the function goes in the body. Very easy to install. This
examples use an image. You can not control toolbar, menubar or
location with this script which may be a good thing. It provides
maximun viewing space for your message with out browser clutter.
You can also use the Close Window script, found at the bottom
of this page.
This
part goes in between the head tags.
<head>
<script language="JavaScript">
<!--
function NewWindow(mypage, myname, w, h, scroll) { var winl = (screen.width
- w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',
scrollbars='+scroll+',resizable' win =
window.open(mypage, myname, winprops) if
(parseInt(navigator.appVersion) >= 4) { win.window.focus(); } }
// -->
</script>
</head>
<body>
This
part goes in between the the body tags.
<a
href="http://www.YOUR-URL-HERE.com"
target="_top" onclick="NewWindow(this.href,'name','600','400','yes');return
false;">
<img src="http://www.YOUR-IMAGE-FILE-HERE.jpg-or-gif"
width="88" height="31" alt="Please use this tag" border="0"></a>
</body>
The
green '600' controls
the width of the window and the blue '400'
controls the height you can change these to whatever you want. Don't
forget to use the border tag with out it your image will have a
blue boarder around it.
Click
on this Working Example
|