herghost Posted March 8, 2010 Share Posted March 8, 2010 Hi all, I am trying to call an function form a .js script within php like this: if(isset($_SESSION['delete'])) { echo "<div id='mypopup' name='mypopup' style='position: absolute; width: 250px; height: 200px; display: none; background: #ddd; border: 1px solid #000;'>" ; echo "fireMyPopup()"; echo "<p>Test</p>"; $_SESSION['delete'] = null; } But nothing happens! Is there a way to do this? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/194495-is-this-possible/ Share on other sites More sharing options...
salathe Posted March 8, 2010 Share Posted March 8, 2010 You'll likely be needing to wrap the JavaScript code in script tags, as you normally would when writing JavaScript in HTML. Quote Link to comment https://forums.phpfreaks.com/topic/194495-is-this-possible/#findComment-1022975 Share on other sites More sharing options...
herghost Posted March 8, 2010 Author Share Posted March 8, 2010 Thanks That did it Quote Link to comment https://forums.phpfreaks.com/topic/194495-is-this-possible/#findComment-1022977 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.