View Full Version : input field stuff


horse*chica
03-11-2004, 07:34 PM
I replied one last time to my last thread about input fields, but I no one has replied...so I hope it's ok just to start a new thread (on input fields, but a different topic than my last thread). If not, I'm sorry :)
Are there any useful sites I could go to and learn about input fields, forms, etc? I've read the CSS page of LEIA, but there are some things that I either didn't see, or just missed it somehow. For instance, I've seen forms on some sites that, when clicked inside the input field, any text already in the field (and how would I do that, too? lol) is either selected/highlighted, deleted (such as in the login area of the forum), changed to different text, etc. I searched on LEIA and the forum and found nothing, but I'm interested in learning about this. Thanks again!

Blackdragonhide
03-11-2004, 08:54 PM
the clicking and deleting aspect is done in javascript:


<input type="text" onClick="this.innerHTML = ' ';">


www.htmlgoodies.com has good htmlk tutorials, as does this site :D

kittycat
03-11-2004, 09:03 PM
To put a value inside the form you have to include value="text" in the code.
Most of the stuff you mentioned is done with javscript, CSS just styles the form (colour etc). http://javascript.internet.com/forms/ Has a few things that you can do with forms and there's another way to clear the input of the box here http://javascriptkit.com/script/script2/cleardefault.shtml
For some reason I think I've seen another way to do that somewhere else but I can't remember where.

horse*chica
03-12-2004, 02:36 AM
Ahhh, I never had any idea that all of that was javascript, I always thought it was HTML :-D Thanks for the info and sites, I've got them bookmarked to read up on.