chriscloyd Posted November 25, 2009 Share Posted November 25, 2009 Well I have this script and the name one is working but the email one isnt working can someone help me window.onload = initpage; function initpage () { document.getElementById("name").onblur = checkname; document.getElementById("nlemail").onblur = checknlemail; } function checkname() { var name = document.getElementById("name").value; if (name == '') { document.getElementById("name_hidden").innerHTML = 'Please enter your name.'; } else { document.getElementById("name_hidden").innerHTML = ''; } } function checknlemail() { var email = document.getElementById("nlemail").value; document.getElementById("email_hidden").innerHTML = 'TEST'; } that was my ajax now my html is <form id="newsletter" name="newsletter" method="post" action=""> <input name="nlemail" type="text" id="nlemail" value="Email" /> <div id="email_hidden"></div> <input name="name" type="text" id="name" /> <div id="name_hidden"></div> </form> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.