Re: How do they do that???

by "rudy limeback" <r937(at)interlog.com>

 Date:  Sat, 11 Mar 2000 11:10:54 -0500
 To:  <Reywob(at)aol.com>,
<hwg-techniques(at)hwg.org>
  todo: View Thread, Original
> ...  it changes the text from "submit" to "wait..."
>
> How have they done this?  I've looked at the source code,
> and there seems to be some javascript in the button, but I
> cannot find any relevant stuff in the [head] section

hi peter

it's all right there in the submit button

   <INPUT TYPE=submit NAME="lookup" VALUE='Lookup!'
          onClick='f.lookup.value="Wait..";return true'>

onClick executes two javascript commands inline (you don't have to call a
function in the <HEAD> if you don't need to)

the first js command assigns a value to the f.lookup field (i.e. this same
field) -- f is the form name and lookup is the field name

the second js command (return true) ensures the form gets submitted after
the value has changed

neat, eh?

___________________
rudy limeback
http://www.interlog.com/~r937/
http://evolt.org/

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