Solarpitch Posted November 24, 2007 Share Posted November 24, 2007 Hey Guys, I am looking to pass a value of a link into a text field if this is possible? If I have this code... <li><a href="javascript:void(0)">Actors</a></li> And when the user clicks on the link I want it to populate a text field below it with the word "Actors". Is this easy simple enough? Quote Link to comment Share on other sites More sharing options...
phpQuestioner Posted November 24, 2007 Share Posted November 24, 2007 try this: <script type="text/javascript"> function update(what) { document.getElementById('field').value = what; } </script> <a href="javascript:update('Actors')">Actors</a> <br><br> <input id="field" type="text"> Quote Link to comment Share on other sites More sharing options...
Solarpitch Posted November 24, 2007 Author Share Posted November 24, 2007 Thats class! Thanks a mill man! 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.