Jump to content
Sign in to follow this  
mboehler3

Input Value: Disappear And Reappear Upon Click

Recommended Posts

Hi, my page here: https://www.surpayroll.com/surechoice/accountant_access.asp?. For the Log In part at the top, I have a script in there that makes the input value disappear upon being clicked on. I want to make it so that the value will reappear if you do not enter any text. I've seen this done on sites before but couldnt find one as an example. But how the page is currently, once you click in the input box, the value will disappear completely. Is there a script that will return the value if the user does not enter any text?

Share this post


Link to post
Share on other sites
Hi, my page here: https://www.surpayroll.com/surechoice/accountant_access.asp?. For the Log In part at the top, I have a script in there that makes the input value disappear upon being clicked on. I want to make it so that the value will reappear if you do not enter any text. I've seen this done on sites before but couldnt find one as an example. But how the page is currently, once you click in the input box, the value will disappear completely. Is there a script that will return the value if the user does not enter any text?
Nm, found a script here:http://perishablepress.com/press/2008/07/2...e-inputs-focus/

Share this post


Link to post
Share on other sites

You would test if the field is empty upon the blur event. If it is, then you can put some text in there.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...