Unexpected result with loading php file with jquery
I am trying to load php file with jquery into div. The php file contains pagination. However, when i tried it, it seems that, the jquery is not working. But, when I access it in website directly, its working. Do you have any idea how can I load the php file with the working jquery actions?
2
Contributors
2
Replies
54 Minutes
Discussion Span
3 Months Ago
Last Updated
4
Views
Related Article:PHP file uploader (i want it to over write)
is a PHP discussion thread by ali3011 that has 1 reply, was last updated 8 months ago and has been tagged with the keywords: php, file, uploader.
Sorrry. Here is the link of sample of what I'm trying to load in a div element. However, jquery that paginates the contents is not working. I tried to load it using httprequest:
ajaxrequest('phpfile.php', 'dividhere');
function get_XmlHttp() {
var xmlHttp = null;
if(window.XMLHttpRequest) { // for Forefox, IE7+, Opera, Safari, ...
xmlHttp = new XMLHttpRequest();
}
else if(window.ActiveXObject) { // for Internet Explorer 5 or 6
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttp;
}
// sends data to a php file, via GET, and displays the received answer
function ajaxrequest(serverPage, tagID) {
var request = get_XmlHttp();
var url = serverPage;
request.open("GET", url, true);// define the request
request.send(null);// sends data
} request.onreadystatechange = function() {
if (request.readyState == 4) {
document.getElementById(tagID).innerHTML = request.responseText;
}