How to successfully set a value to a field in JS? tried on.focus but no luck
Hi I'm trying to get my input field to say 'Enter your e-mail address' and when you click on it, it goes away to let the user type it. I tried playing around with on:focus and other various tips on SO but I couldn't manage to get it working. Can anyone point me in the right direction? You can see what I'm talking about at heyscout.com.
In my script tags, I have:
For my input field, I have
<div id="cid_1" class="form-input"> <input type="email" class="form-textbox validate[required, Email]" id="input_1" name="q1_stayIn1" size="30" /> </div> <button class="signup_btn" type="submit" class="form-submit-button"> Okay! </button>
It should be working but I'm not completely sure what's the issue.
Thanks for any help!
In case you don't already know, you can do this with plain HTML if you don't need to support older browsers.
<input type="email" placeholder="Enter your e-mail address" class="form-textbox validate[required, Email]" id="input_1" name="q1_stayIn1" size="30" />