I have a problem in integrating PHP and JQuery:
My main file is MyFile.html and the AJAX call file is ajax.php.
The ajax.php function returns links to myFile.html as
<a href Link.php?action=Function ></a> (i.e echo ' <a href Link.php?action=Delete';)
When I click the returned link from MyFile.html it’s performing as expected. I need how to modify the equivalent code to work correctly in Myfile.Html.
My motivation is that the ajax.php return link should work in HTML.
Any ideas?
Related Questions
No related questions found
It sounds like you are trying to simply set the contents of an HTML element to the result of executing a PHP script. Here is a sample PHP script that will just print an HTML link depending on what parameter you pass it in the ‘foo’ parameter.
Now you need to load that PHP script from inside your HTML file using Javascript (jQuery). Here is a simple page demonstrating that.
Some things to remember:
Here is the directory structure you should have, assuming /www/data is the root directory of your web server’s files: