We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,860 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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
oishi
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Without any relevant code or a link to the site online, it is difficult for members of this forum to give guidance.

JorgeM
Industrious Poster
4,015 posts since Dec 2011
Reputation Points: 294
Solved Threads: 545
Skill Endorsements: 115

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;
       }
oishi
Newbie Poster
2 posts since Feb 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0579 seconds using 2.69MB