#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Posts
    191
    Rep Power
    13

    Input text feild erasure :)


    Ok, here is my problem. I have an email subscription form on my site. It is a simple script that takes the input from the input text feild on the page and then puts it into email and says basically "Subscribe $email_Address to List@domain.com."

    Well, in the text field its default value is "Type E-Mail Here." Well, my stupid *** users dont understand that they need to erase this before they type in their email. So instead of erasing this, i end up getting a subscription notice like "Subscribe someone@stupidassidiots.comType E-mail Here to list@domain.com"

    Basically what i need is a script that when they click in the text feild it erases the default value. I have seen this before, but i'm not sure how to do this. Thanks!!!!!!!!!!!!!!!!

    p.s. This is not meant to offend any "Stupid *** users". lol. :P


    Code:
    <FORM name=hmspin action=hmspin.php method=post>
    <INPUT maxLength=45 value="Type E-Mail Here" name=email>
    <br>
    <INPUT type=submit value=Subscribe name=submit>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Posts
    36
    Rep Power
    14

    Lightbulb


    Hi,

    try smth like this:

    <FORM name=hmspin action=hmspin.php method=post>
    <INPUT maxLength=45 value="Type E-Mail Here" name=email onFocus=" if (document.hmspin.email.value==''Type E-Mail Here") document.hmspin.email.value='' >
    <br>
    <INPUT type=submit value=Subscribe name=submit>

    it should work,
    Ciao

IMN logo majestic logo threadwatch logo seochat tools logo