Zoud Posted January 15, 2007 Share Posted January 15, 2007 Here's what I have:[code] if($num == 0) echo "<script type=text/javascript language=javascript>alert('BOO!');</script>";[/code]But when I try to exicute the script, it will actually write down the <b>alert('BOO!');</b> but it will leave out the <b>script type=text/javascript... ect.</b>.How do I make it actually alert the message while still using PHP? Link to comment https://forums.phpfreaks.com/topic/34336-exicuting-js-from-php/ Share on other sites More sharing options...
owenjh Posted January 15, 2007 Share Posted January 15, 2007 Have you tried with the </script> on the end?[CODE] if($num == 0) echo "<script type=text/javascript language=javascript>alert('BOO!');</script>";[/CODE] Link to comment https://forums.phpfreaks.com/topic/34336-exicuting-js-from-php/#findComment-161537 Share on other sites More sharing options...
Zoud Posted January 15, 2007 Author Share Posted January 15, 2007 Yes, I just did that. Now it wont alert, nor show the script in text. Link to comment https://forums.phpfreaks.com/topic/34336-exicuting-js-from-php/#findComment-161539 Share on other sites More sharing options...
Zoud Posted January 15, 2007 Author Share Posted January 15, 2007 Nevermind. I've figured it out. It was an error that was earlier on in the script.Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/34336-exicuting-js-from-php/#findComment-161541 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.