disappearing values

admin

Administrator
Staff member
How do I make the "value" of a form input tag disappear when someone selects the field on a web page. Is that CSS? Javascript? I searched but can't find a reference to it anywhere but that may be because I don't know what i am looking for or what to call it.<br />
<br />
Bob<!--content-->probably javascript.<!--content-->Yes that's what I thought but I can't locate it or figure out what part of the script does that.<br />
<br />
Bob<!--content-->It's in the input field (of course)<br />
<br />
<input type="text" name="who_name" size="12" value="Friends Name" maxlength="100" onFocus="if(this.value='Friends Name') {this.value='';}" onBlur="if (this.value=='') {this.value='Friends Name';}"><br />
<br />
Now, How can I get it to work with the comma in "Friend's" It works the way it is but not with the comma and I need to have that comma in there since my site is an editing services site I must have the proper English format. It's probably simple but I can't find it in Oreilly's<br />
<br />
Bob<!--content-->try putting a backslash (\) before your apostrophe (') like \'<br />
<br />
characters like apostrophes (') and quotes (") are used in programing, so if u want to use them in strings you must escape them with a backslash or they will mess things up.<!--content-->Oh yes. Thanks I will try that and that is definitely an apostrophe not a comma! Sorry, it was late when I wrote that and I was in a hurry to see the soccer game.<br />
<br />
Bob<!--content-->
 
Back
Top