At present I only have IE and FF installed and it works in both of those.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Armendariz Sent: Wednesday, June 06, 2007 9:05 PM To: 'NYPHP Talk' Subject: RE: [nyphp-talk] Removing Text from an Input Box Is the defaultValue property cross-browser (and platform)? Mark _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:54 PM To: 'NYPHP Talk' Subject: RE: [nyphp-talk] Removing Text from an Input Box <input value="Display Value" onfocus="clearText (this);" /> is a bit more complete. Or <input value="Display Value" onfocus="clearText (this);" onblur="restoreText (this);" /> can replace empty values with your label. <script type="text/javascript"> function clearText (el) { if (el.defaultValue == el.value) el.value = ""; } function restoreText (el) { if (el.value == "") el.value = el.defaultValue; } </script> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Dirnberger Sent: Wednesday, June 06, 2007 8:48 PM To: 'NYPHP Talk' Subject: RE: [nyphp-talk] Removing Text from an Input Box I usually do something like the following to clear the value. Keep in mind that when the type is set to password your text will always display masked. DiRN <input onfocus="clearText (this);" /> <script type="text/javascript"> function clearText (el) { if (el.defaultValue == el.value) el.value = ""; } </script> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ben Sgro (ProjectSkyline) Sent: Wednesday, June 06, 2007 8:44 PM To: NYPHP Talk Subject: [nyphp-talk] Removing Text from an Input Box Hello, This is more of a JS question, but I'm going to ask it anyways. I just got the book, "Pro Javascript Techniques" (Apress) and what sucks is that many of the examples do not work. What I want to do is have to input boxes, a username and password. Instead of having labels next to them such as: Username: [INPUT BOX] Password: [INPUT BOX] I want to have the text inside the box [INPUT BOX: Username]. etc... When the user mouses over, I want to make that "Username" text dissapear so they can type their username in. Any help? - Ben Ben Sgro, Chief Engineer ProjectSkyLine - Defining New Horizons
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php