i am doing the website for a girls grammar school where i am employed and in on alumni page i have a form created in dreamweaver where they can fill-in their details. i placed mock entries in the fields to give them inspiration of what to write, but would like this info to disappear as soon as the past pupil clicks within the field to make their entry. can someone tell me what code i need to insert. many thanks in advance. here is a link to the page in question with the form http://www.girlsacademy.org.uk/pages/pastpupils.html
I'm not sure about removing content - they might want to just correct something, not to retype everything. I think it will be more clear, if you will just select content of a field. And instead of onclick you might want to use onfocus - this event happends in all browsers, and it also will occur, if user reached a field using Tab button. so, it will be something like <input onfocus="this.select()"
Joined: Jul 05, 2002
thanks for your help. the "clearField(this);" did what i was asking for. i will alter the code my hand for now, but will see if it is possible to do it from within dreamweaver. (sorry if i insulted any hand-coders, but i am one of those that rely of wysiwyg. LOL.)
Hello there, I sat down and typed up this script for you. It will remove the default text without removing the users input. It will make them happy is they typed in all the information. I placed it on my site with an explaination about it. I thought this was a good topic to add to my scripts, thanks for the idea. http://www10.brinkster.com/a1ien51/Scripts/RemoveDefaultText.htm If you have any problems geting it to work, just post it here.