hogtied
12-08-2002, 04:02 AM
Hello,
I'm trying to create a universal clearbox javascript function.
This function is intend to clear any text box that the user clicks on.
I have 3 textboxes that I would like cleared with one script,
when the user clicks inside the textbox. (Making the textbox have the focus)
<form name="newsletter" ACTION="" METHOD=POST>
<INPUT TYPE=HIDDEN NAME="src" VALUE="">
<p> <strong>Join our<br>
Hot Deals Newsletter</strong>
<input name="email" type="text" value="Enter your email here" onClick="clearbox('newsletter', 'email')">
<script language="JavaScript" type="text/JavaScript">
function clearbox(formID, boxID)
{
document.formID.boxID.value = ""
}
</script>
Thanks
Hotgtied
I'm trying to create a universal clearbox javascript function.
This function is intend to clear any text box that the user clicks on.
I have 3 textboxes that I would like cleared with one script,
when the user clicks inside the textbox. (Making the textbox have the focus)
<form name="newsletter" ACTION="" METHOD=POST>
<INPUT TYPE=HIDDEN NAME="src" VALUE="">
<p> <strong>Join our<br>
Hot Deals Newsletter</strong>
<input name="email" type="text" value="Enter your email here" onClick="clearbox('newsletter', 'email')">
<script language="JavaScript" type="text/JavaScript">
function clearbox(formID, boxID)
{
document.formID.boxID.value = ""
}
</script>
Thanks
Hotgtied