Hi all.. i started learning javascript about 2 days ago..
i have tryed to make a VERY simple Validate function.. here it is..
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
function Validate()
{
if (document.form.user.vlaue="a"
{
window.alert("Thanks"
}
}
//-->
</SCRIPT>
and this is the cade from my form:
<FORM NAME="form">
Username:<INPUT TYPE="TEXT" NAME="user">
<INPUT TYPE="SUBMIT" NAME="BUTTON" onClick="Validate()">
</FORM>
now why is it that i can enter any value into the textbox yet it will all ways give me the message "thanks"???
Thanks to all that help...
i have tryed to make a VERY simple Validate function.. here it is..
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
<!--
function Validate()
{
if (document.form.user.vlaue="a"
{
window.alert("Thanks"
}
}
//-->
</SCRIPT>
and this is the cade from my form:
<FORM NAME="form">
Username:<INPUT TYPE="TEXT" NAME="user">
<INPUT TYPE="SUBMIT" NAME="BUTTON" onClick="Validate()">
</FORM>
now why is it that i can enter any value into the textbox yet it will all ways give me the message "thanks"???
Thanks to all that help...