|
-
Apr 24th, 2003, 07:07 AM
#1
Thread Starter
Fanatic Member
Javascript IF Statements
Im new to Javascript and have written the follwowing and put it in my head tags.
<SCRIPT LANGUAGE="JavaScript">
function Remove(){
if (document.F_AMOUNT.value = "")
{
var response = alert("testing!!!");
return false
}
}
</script>
Later on in this page my function is called when submitting a form
<form method="post" action="TRAVEL_S005.asp" onSubmit="return Remove();">
the javascript should cature if one of my textboxes named F_AMOUNT is empty and if so not submit the form. It doesnt do anything at the moment and I think I have got the if staement wrong, can anybody help please.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|