bahy
04-22-2003, 06:04 AM
I am having a small problem with the javascript please help me .
In a big page i divided into 3 part , above , left and right .
On the left there is always a "login form" for user to enter their username and password to login . The code for the login form is below :
<form name="o">
<font size=2 face=Verdana><strong>::<a href="register.php">SIGN UP</a></strong></font>
<font size=1 face=Verdana><br><b>Tên truy cập:</b></font>
<input type=text size=8 name="usernamen"><br>
<font size=1 face=Verdana><b>Mật khẩu :</b></font>
<input type=password size=8 name=passwordn><br>
<img name =signin src=signin.jpg border=0 alt="Click vào để đăng nhập;" onclick = login()>
</form>
<script language="javascript">
<!--
function login()
{
window.location = "login.php?username=" + document.o.usernamen.value +"&password=" + document.o.password.value
}
-->
</script>
also i use a javascript function generate when the user click on the picture signin.jpg . that will lead the user to another page :
"login.php?username=<?>&password=<?>"
while both of the <?> are the value i want to get from the "usernamen" and the "passwordn" in the o form ( i am using strange name , plz forgive about this - so i did put them into quotes). The javascript above is to do that . it will get the value from the specified fields and pass to the window.location function .
But u know ? When i clicked on the signin.jpg , it appeared the "Error on the page" in the status bar .
I am know only little of javascript , and now don't know how to solve this . So i came here and asking for help .
In a big page i divided into 3 part , above , left and right .
On the left there is always a "login form" for user to enter their username and password to login . The code for the login form is below :
<form name="o">
<font size=2 face=Verdana><strong>::<a href="register.php">SIGN UP</a></strong></font>
<font size=1 face=Verdana><br><b>Tên truy cập:</b></font>
<input type=text size=8 name="usernamen"><br>
<font size=1 face=Verdana><b>Mật khẩu :</b></font>
<input type=password size=8 name=passwordn><br>
<img name =signin src=signin.jpg border=0 alt="Click vào để đăng nhập;" onclick = login()>
</form>
<script language="javascript">
<!--
function login()
{
window.location = "login.php?username=" + document.o.usernamen.value +"&password=" + document.o.password.value
}
-->
</script>
also i use a javascript function generate when the user click on the picture signin.jpg . that will lead the user to another page :
"login.php?username=<?>&password=<?>"
while both of the <?> are the value i want to get from the "usernamen" and the "passwordn" in the o form ( i am using strange name , plz forgive about this - so i did put them into quotes). The javascript above is to do that . it will get the value from the specified fields and pass to the window.location function .
But u know ? When i clicked on the signin.jpg , it appeared the "Error on the page" in the status bar .
I am know only little of javascript , and now don't know how to solve this . So i came here and asking for help .