Bigdogcms Posted April 1, 2008 Share Posted April 1, 2008 i posted this once aready but i thought maybe if i clearify the title some more people will help, so here it is Ok, so i have an ajax/php search form that allows me to search my db(right now an xml file) for users/there email what i want to do is create a link that when the user clicks it it fills in the "to" input field here's what i have so far <?php $hint= "<a href='# ' onClick='document.email.Body.value+= (\ " . $z->item(0)->childNodes->item(0)->nodeValue . " \)'> " . $y->item(0)->childNodes->item(0)->nodeValue . " <font color='#999999'>(" . $z->item(0)->childNodes->item(0)->nodeValue . ")</font></a>"; } ?> and here is a working copy of the javascript not in php <a href="# " onClick="document.email.Body.value+= 'Users email'">Click</a> please help Link to comment https://forums.phpfreaks.com/topic/99008-solved-need-help-trying-to-use-inline-javascript-in-php-echo/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.