www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Forms: Grayed out text

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Posts
    2

    resolved [RESOLVED] Forms: Grayed out text

    Hi,
    I have made my form (using iweb html snippet) with example text for each field (1st attachment)

    I am not really good with all the tags for html, but what I'm trying to do is keep the example text light gray until the user clicks in the field and the onFocus="" and then when they start typing the text is black, so it is clear what they have filled out.

    I have searched the whole day on google for the answer but no help.
    Is it possible to do this using only the html snippet or do I have to edit the html source?
    I would greatly appreciate it if someone has the answer.

    Here is my html Snippet:
    <FORM METHOD="POST" ACTION="mailto:myemail?subject=Saxophone Reques"ENCTYPE="text/plain">
    <BR>
    <BR>
    <INPUT TYPE="text" NAME="name"
    value="First Last"
    onFocus="" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" SIZE="60">
    <BR>
    <BR>
    <BR>
    <INPUT TYPE="text" Name="email" value="null@null.com" onfocus="value=''" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" size="60">
    <BR>
    <BR>
    <BR>
    <INPUT TYPE="text" NAME="occasion" value="Wedding/Party/Concert/etc" onfocus="value=''" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" size="60">
    <BR>
    <BR>
    <BR>
    <INPUT TYPE="text" NAME="date" value="dd/mm/yy" onfocus="value=''" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" size="60">
    <BR>
    <BR>
    <BR>
    <INPUT TYPE="text" NAME="location" value="City or Specific Address" onfocus="value=''" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" size="60">
    <BR>
    <BR>
    <BR>
    <TEXTAREA NAME="comment" STYLE="color: #5c5c5d; font-family: Arial; font-size: 12px; background-color: #f7f7f7;" ROWS=6 COLS=58></TEXTAREA>
    <P>
    <input type="image" src="submit.png" HEIGHT="22" WIDTH="96" />
    <BR>
    <BR>
    </FORM>
    Attached Images Attached Images

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    onfocus = "this.value='';this.style.color='black'"
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Aug 2009
    Posts
    2
    Wow that was quick and exactly what I was looking for.
    Thanks thebearmay!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles