mani_ Posted December 9, 2005 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. Link to comment Share on other sites More sharing options...
hacknsack Posted December 9, 2005 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, Link to comment Share on other sites More sharing options...
mani_ Posted December 10, 2005 Author 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 Link to comment Share on other sites More sharing options...
alzable Posted December 13, 2005 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now