PDA

View Full Version : javascript log in form help


Annell
12-27-2003, 05:07 AM
Hi all,
I have the following javascript which is a multiple user password log in form.
However when clicked the page opens in a new browser window - I want it to open in a pop-up window - anyone got any ideas on how I can get this to work?
Thank you
Annell

<form name=login>
<table width=225 border=1 bordercolor="990033" cellpadding=3>
<tr><td colspan=2><center><font size="+2" color="990033"><b>Personal Results</b></font><br>
</center></td></tr>
<tr><td><font face="arial" size="3" color="990033">Name:</font></td><td><input type=text name=username></td></tr>
<tr><td><font face="arial" size="3" color="990033">Registration Number:</font></td><td><input type=text name=password></td></tr>
<tr><td colspan=2 align=center><input type=button value=<a href="index.html" onclick="NewWindow(this.href,'name','400','400','yes');return false;">"Enter"</a> onClick="Login()"></td></tr>
</table>
</form>

ucm
12-27-2003, 05:22 AM
welcome back to the forums!

the code you gave is pretty jumbled togeather, it would be amazing if it works as you pasted it here... did it get pasted wrong or is that the way the code is supposed to be?

if it is pasted wrong, just copy and paste the code again and we'll take another look for ya :)

if the code pasted correctly then i noted a couple changes for you:
the link has href="index.html" change that to href="#" and change the this.href in the onClick event to 'index.html'


also, this script (http://www.htmlforums.com/showthread.php?s=&threadid=31426&perpage=15&highlight=open%20ucm&pagenumber=2) should help simplify the popup window creation for you, enjoy ;)