robert_gsfame Posted May 13, 2010 Share Posted May 13, 2010 I just wonder if it is possible to include php inside external js... just for example: external.js function warn(){ alert("<?php echo "hello world"?>"); } <script src="external.js"> </script> <body> <input type="button" onclick="warn()" value="clickme"> </body> how can i have this "hello world" alert thx Quote Link to comment Share on other sites More sharing options...
trq Posted May 13, 2010 Share Posted May 13, 2010 If your server is configured to parse js files as php, yes. Quote Link to comment 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.