[PLUG] Javascript question
Randall Hansen
list at sonofhans.net
Tue Oct 7 17:58:01 UTC 2003
Thus spoke "Matt Alexander" <m at pdxlug.org>
( Tue, 7 Oct 2003 16:46:58 -0700 (PDT) ):
> Does anyone know how I would send the focus to a text field based on
> its contents? For example, I dynamically create an HTML table
> (containing input text fields) from an SQL query and I want to have
> the cursor automatically go to a certain field containing a certain
> string of text. Thanks,
Try this:
http://sonofhans.net/select-form-by-contents.html
I just hacked it up, but it should work in all browsers with decent
DOM support (e.g. all modern ones). The page is self-documenting.
Let me know if it's what you want.
r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.pdxlinux.org/pipermail/plug/attachments/20031007/ab5cd980/attachment.asc>
More information about the PLUG
mailing list