MDanz Posted February 22, 2010 Share Posted February 22, 2010 how to make var newtext2 a hyperlink? the hyperlink is a php variable. I've only included this line of code. var newtext2 = obj( "reply" ).value; Quote Link to comment https://forums.phpfreaks.com/topic/192902-make-variable-a-hyperlink/ Share on other sites More sharing options...
ohdang888 Posted February 22, 2010 Share Posted February 22, 2010 what do you mean? you want to make its value a link? var newtext2 = obj( "reply" ).value; document.getElementById('test').href = "www.google.com"; document.getElementById('test').innerHTML = newtext2; with this html: <a id="test"></a> Quote Link to comment https://forums.phpfreaks.com/topic/192902-make-variable-a-hyperlink/#findComment-1016105 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.