dizzy1 Posted May 23, 2009 Share Posted May 23, 2009 Hi i am trying to simply do a java script call in php: echo"<a href='#' "; echo 'onclick="DOCALL("test1")";'; echo">test</a>"; Thanks In Advance Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/ Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\'test1\');">test</a>'; Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/#findComment-840497 Share on other sites More sharing options...
dizzy1 Posted May 23, 2009 Author Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\'test1\');">test</a>'; That worked but how do i putt a variable in thier like: echo '<a href="#" onclick="DOCALL(\'$ere\');">test</a>'; Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/#findComment-840650 Share on other sites More sharing options...
jackpf Posted May 23, 2009 Share Posted May 23, 2009 echo '<a href="#" onclick="DOCALL(\''.$ere.'\');">test</a>'; Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/#findComment-840662 Share on other sites More sharing options...
Axeia Posted May 23, 2009 Share Posted May 23, 2009 To avoid using a hard to read syntax it might be worth it reading up on sprintf Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/#findComment-840701 Share on other sites More sharing options...
dizzy1 Posted May 24, 2009 Author Share Posted May 24, 2009 Cheers Lads Works Perfectly ;D Link to comment https://forums.phpfreaks.com/topic/159352-solved-javascrip-in-php/#findComment-841354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.