Re: javascript and forms

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Wed, 19 Jan 2000 16:02:02 +0530
 To:  "Cyanide _7" <leo7278(at)hotmail.com>,
<jrstanford(at)home.com>
 Cc:  <hwg-languages(at)hwg.org>
 References:  hotmail
  todo: View Thread, Original
>>> testform.name.select(); // automatically focuses to select

In Netscape 4.61 & below on windows you have to first set focus, before
select(). You won't get an error, but the field won't be selected either!

However, IE 4+ allows a direct select() !

Cheers,
-Srini


----- Original Message -----
From: Cyanide _7 <leo7278(at)hotmail.com>
To: <jrstanford(at)home.com>
Cc: <hwg-languages(at)hwg.org>
Sent: Tuesday, January 18, 2000 4:27 PM
Subject: Re: javascript and forms


<SNIP>

| function checkForm(testform) {
|   var valid = true;
|   if (testform.name.value ="") {
|     alert ("You must enter your name in the required field.");
|     testform.name.select(); // automatically focuses to select
|     valid = false;
|   }
|   return valid; file://return valid to continue or cancel submition
| }

</ END SNIP>

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA