Webbers Corner

Full Version: Is there a better way?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to have a link that when clicked will launch a new window with the hieght and width that I specify. Currently I'm using javascript and it works fine, but IE7 throws all kinds of warnings at you. I don't want to scare people away.

Here is what I'm doing now:

Code:
<SCRIPT LANGUAGE="JavaScript">
function win() {
msg=window.open("index.html","","height=410,width=800,left=0,top=0");
}
</script>


and then the link:

Code:
<a href="javascript:win()">the link</a>


I'm sure there is a simpler way of doing this either with plain html or a better javascript applet. Any suggestions?

Code:
<span class="popup" onclick='javascript:window.open("testwindow1.htm","blank","toolbar=no,width=250,height=250")'>new window</span>


Put that inside the paragraph tags where you want to open the new window. Replace testwindow1.htm and replace new window with the name of the anchor text.

Great, I'll give it a try. Thanks.
Reference URL's