mani_ 0 Posted December 9, 2005 Report Share Posted December 9, 2005 Anyone tell me how can i call a php file (a function inside that file) by using Javascript in a HTML page. Quote Link to post Share on other sites
hacknsack 0 Posted December 9, 2005 Report Share Posted December 9, 2005 mani_,Kinda difficult to say without knowing your context, but here's what I think you mean.test.php <?phpecho "alert('".$_GET['user']."');";?> jsTest.html <html><head> <title>PHP Caller</title><script type="text/javascript" src="test.php?user=mani_"></script></head><body>This is a test....</body></html> Let me know if I'm not getting your meaning.Thanks, Quote Link to post Share on other sites
mani_ 0 Posted December 10, 2005 Author Report Share Posted December 10, 2005 yes thats works and the same thing i was meaning.I have a index.htm page as a home page and another php file.. i dont want to change the index.htm to index.php... thats why i was asking to put some output from php file in htm file..thanks anyways Quote Link to post Share on other sites
alzable 0 Posted December 13, 2005 Report Share Posted December 13, 2005 Hi,I have moved this topic to Java Script as you are asking for some java script. This way more people will be able to help as people who are helping out with java script are in the java script forum. alzable Quote Link to post Share on other sites
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.