Page 1 of 1

Onfocus for textarea - mental enema required

Posted: Thu Dec 11, 2008 11:25 am
by sjk1000
Hi all
I've messed my head up again with quotes and double quotes - I was doing so well.

I have the text area as shown below and I want to add an onfocus to clear the 'Game Title' text when the box is selected.

Code: Select all

print("<textarea rows='1' cols='15' name='gametitle' id='gametitle' >[color=#40BF00]Game Title[/color]</textarea><BR>");
Can someone please tell me how I get the onfocus in there or whether I'm creating my own problems using print("....");
Any help is very much appreicated.
Thanks, Steve

Re: Onfocus for textarea - mental enema required

Posted: Thu Dec 11, 2008 11:30 am
by John Cartwright

Code: Select all

print "<textarea rows='1' cols='15' name='gametitle' id='gametitle' onblur='somefunction();'>Game Title</textarea><BR>";
I'm not exactly sure what you were having trouble with exactly, but something like this?