...

View Full Version : Javascript window.open help



johnish
08-15-2008, 07:44 AM
hey guys, im kinda new to js but i want to have a popup login page, right now it goes to google but it doesnt seem to work quite right, have this code


<div id="admin"><a href="javascript:window.open('http://www.google.com','newWin','width=600,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,sta tus=No,resizable=No,fullscreen=No');" >Admin login</a></div>

what it does is it pops up google, but with the html page changes, it takes me to a black page with [object window] displayed..

when i have
<div id="admin"><a href="javascript:window.open('http://www.google.com','newWin','width=600,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,sta tus=No,resizable=No,fullscreen=No'),_blank;");>Admin login</a></div>

the _blank at the end... it works the way i want it BUT the error console in firefox complains about it and if it complains in firefox no question it wont work in IE

can anyone help

_Aerospace_Eng_
08-15-2008, 07:59 AM
Try

<div id="admin"><a href="http://google.com" onclick="window.open(this.href,'newWin','width=600,height=300,left=0,top=0,toolbar=0,location=0,scrollbars=0, statusbar=0,resizable=0,fullscreen=0');return false">Admin login</a></div>

johnish
08-15-2008, 08:03 AM
thanks so much makes perfect sense



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum