jjmusicpro Posted May 6, 2008 Share Posted May 6, 2008 I have a few basic hyperlinks, that i wanted to send the value of that hyperlink into a javascript function. How do i get the value of the hyperlink? I wanted to get what was in the display part of the hyperlink.. or unless i can set a value somehow in the hyperlink thanks again! Link to comment https://forums.phpfreaks.com/topic/104380-getting-value-of-a-hyperlink-to-pass-through-javascript/ Share on other sites More sharing options...
moselkady Posted May 6, 2008 Share Posted May 6, 2008 Try this: <a href="" onClick="alert(this.text)">click to see this title</a> Link to comment https://forums.phpfreaks.com/topic/104380-getting-value-of-a-hyperlink-to-pass-through-javascript/#findComment-534418 Share on other sites More sharing options...
jjmusicpro Posted May 6, 2008 Author Share Posted May 6, 2008 didnt work.. i tried this <a href="javascript: void(0)" onClick="getdescdetails(this.text)">I want to get this value</a> I want it to send the value thats the actual hyperlink..do i need to give it an id? Link to comment https://forums.phpfreaks.com/topic/104380-getting-value-of-a-hyperlink-to-pass-through-javascript/#findComment-534444 Share on other sites More sharing options...
moselkady Posted May 6, 2008 Share Posted May 6, 2008 could you post your getdescdetails() function ? Link to comment https://forums.phpfreaks.com/topic/104380-getting-value-of-a-hyperlink-to-pass-through-javascript/#findComment-534716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.