cozzy1984 Posted February 1, 2008 Share Posted February 1, 2008 Hi, I've been looking for a script that will bascially have a div above a form, when i focus or click on each text box within the form the div text above will change telling the user what to enter in, accordingly. Anyone know of one? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted February 1, 2008 Share Posted February 1, 2008 This sounds like basic javascript; you really don't need ajax to do this, unless you want to get the directions sever side. Well a basic example would be like this: <script language="javascript"> function info(director) { document.getElementById('directions').innerHTML = director; } </script> <div id="directions"></div> <br><br> First Name: <input type="text" name="FirstName" onfocus="info('Please Enter Your First Name')"> <br><br> Last Name: <input type="text" name="LastName" onfocus="info('Please Enter Your Last Name')"> Quote Link to comment Share on other sites More sharing options...
cozzy1984 Posted February 3, 2008 Author Share Posted February 3, 2008 Cheers mate for your help. Appreciate it. Modified that to include a title and text below which works great. 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.