Fenhopi Posted July 17, 2011 Share Posted July 17, 2011 Hi, I have a few links on my site. What I need is for when I click one of these links I want the link text to appear in the textbox above. Is this doable? Quote Link to comment https://forums.phpfreaks.com/topic/242227-make-link-text-appear-in-textbox/ Share on other sites More sharing options...
teynon Posted July 17, 2011 Share Posted July 17, 2011 Textbox in the same page? Seems pointless if they are going to immediately move to a different page. If you're trying to do it in a frame, I cry because your using frames. Either case, javascript is your answer here. <html> <head> <script> function alertBox() { alert(document.getElementById('link').href); } </script> </head> <body> <a href="http://www.bigfatorgy.com" id="link" onClick="alertBox();">Test</a> </body> </html> By the way, bigfatorgy.com is available. Hmm... Quote Link to comment https://forums.phpfreaks.com/topic/242227-make-link-text-appear-in-textbox/#findComment-1243921 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.