return/enter key with forms
by "susan banta" <sebanta(at)hotmail.com>
|
Date: |
Thu, 09 Mar 2000 08:54:15 PST |
To: |
hwg-basics(at)hwg.org |
|
todo: View
Thread,
Original
|
|
The problem is: Stopping the user from pressing the return key in an empty
text box.
I tried using javascript on the input field but it seems that the form is
being activated as soon as the return key is pressed. Thus an ODBC error
because a query executes with a blank sql statement.
Any suggestions?
This is the script I am using ....
function checkfornull(field){
var checkField = field.value
if (checkField == "") {
alert ("Please enter a value")
field.value = ""
field.focus()
return false
}
return true
}
Thanks in advance,
Susan
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA