[m]
12-14-2002, 09:06 AM
this is a small java script I made that has the labeling text inside the text box, when u click on the text box it clears out the text that was in it so that u can type in it. if u didn't type anything and click out of it it returns back to the label. if u did type something in it stays. I just wrot it for IE cuz I didn't have NS, but now that I have NS I guess I'l make it so it works:)
my hosting is down so here it is:
<!doctype html public "-//w3c//dtd html 3.2//en">
<!-== Copyright ©2002, mike.==- if you decide to modifiy this script I'd like to know how you changed it my mail is: mike77800@hotmail.com>
<html>
<head>
<title>loginSystem</title>
<script>
function inputMod(nameOfbox, valueOfbox){
if(nameOfbox.value==valueOfbox){
nameOfbox.value='';
}else
if(nameOfbox.value==""){
nameOfbox.value=valueOfbox;
}
return(0);
}
</script>
</head>
<body background="" bgcolor="#ffffff" text="#000000" link="#c0c0c0" vlink="#c0c0c0" alink="#c0c0c0">
<center>Login information, input name and password<br><br>
<input type="text" name="username" size="20" maxlength="16" value="Username" onfocus='inputMod(username, "Username")' onblur='inputMod(username, "Username")'><br>
<input type="text" name="password" size="20" maxlength="16" value="Password" onfocus='inputMod(password, "Password")' onblur='inputMod(password, "Password")'><br>
<INPUT TYPE="submit" VALUE="Login"><br><br>
<br>Copyright ©2002, mike.
</center>
</body>
</html>
the function:
inputMod(nameOfbox, "valueOfbox")
says the name of the textbox and you can modifiy what it will say
my hosting is down so here it is:
<!doctype html public "-//w3c//dtd html 3.2//en">
<!-== Copyright ©2002, mike.==- if you decide to modifiy this script I'd like to know how you changed it my mail is: mike77800@hotmail.com>
<html>
<head>
<title>loginSystem</title>
<script>
function inputMod(nameOfbox, valueOfbox){
if(nameOfbox.value==valueOfbox){
nameOfbox.value='';
}else
if(nameOfbox.value==""){
nameOfbox.value=valueOfbox;
}
return(0);
}
</script>
</head>
<body background="" bgcolor="#ffffff" text="#000000" link="#c0c0c0" vlink="#c0c0c0" alink="#c0c0c0">
<center>Login information, input name and password<br><br>
<input type="text" name="username" size="20" maxlength="16" value="Username" onfocus='inputMod(username, "Username")' onblur='inputMod(username, "Username")'><br>
<input type="text" name="password" size="20" maxlength="16" value="Password" onfocus='inputMod(password, "Password")' onblur='inputMod(password, "Password")'><br>
<INPUT TYPE="submit" VALUE="Login"><br><br>
<br>Copyright ©2002, mike.
</center>
</body>
</html>
the function:
inputMod(nameOfbox, "valueOfbox")
says the name of the textbox and you can modifiy what it will say