PDA

View Full Version : pLEASE HELP ME FIX THIS SCRIPT


taydu
11-17-2002, 04:06 PM
TD KHO^NG MUO^'N NO' OPEN NEW WINDOW KHI MA` CLICK LOGIN, XIN XU+?A DU`M TD DDE^? CHO NO' KHO OPEN NEW WINDOW SAU KHI CLICK LOGIN.\
HERE IS THE CODE
<html>
<head>
<title>JavaSide.com : applets / RBL Java password applet</title>
<LINK REL=STYLESHEET TYPE='text/css' HREF='./rbl_1.css'>
</head>


<TD WIDTH="30%">
<CENTER>
<P><BR><BR>
<applet codebase="./" code=tpassword width=1 height=1 NAME="tPass" ID="tPass">
<PARAM name="cabbase" value="./tpassword.cab">
<PARAM name="auto" value="NO">
<PARAM name="target" value="PASS">
<PARAM name="t1" value="./">
</applet>
<P>
<A HREF="javascript:document.tPass.login();"></A> <BR>
<P><BR>
<FORM NAME="f">
<TABLE BGCOLOR=#D0F0FF class="p1">
<TR><TD colspan=2 ALIGN="CENTER" class="p1">Login with form</TD></TR>
<TR class="p2"><TD>User</TD><TD><INPUT type="text" name="u1" size=10 value=""></TD></TR>
<TR class="p2"><TD>Password</TD><TD><INPUT type="password" name="p1" size=10 value=""></TD></TR>
<TR class="p2"><TD colspan=2 ALIGN="CENTER"><INPUT type="button" value=" OK " onclick="Verif()"></TD></TR>
</TABLE>
</FORM>

</TD>
</TR></TABLE>
</BODY>
<SCRIPT language="JavaScript">
<!--
function Verif()
{
form = document.f;
uname = form.u1.value ;
upass = form.p1.value ;

s = document.tPass.verif(uname, upass) ;

if (s > "") {
document.open(s, "_new", "") ;
}

return ;
}
// --></SCRIPT>
</HTML>

TyP0
11-17-2002, 07:44 PM
hmm...according to the HTML.....technically no' khong co' open new windows...chances la` o*? tu*` ca'i JAVA code. Do u have like a place for me to check out. co' ca'i code na`y cu~ng vo^ du.ng la('m.

djt_
11-18-2002, 07:29 AM
document.open(s, "_new", "") ; >> document.url(s, "_new", "") ;

not sure if's document.url but check

TommyBoy2002
11-18-2002, 08:05 AM
change the _new to _self and see if it still open in new window

taydu
11-18-2002, 07:26 PM
thank you everyone, TD will try it tongiht and ask more question if i have more problems