Display course page via javascript

Display course page via javascript

by Tuyen Huynh -
Number of replies: 0

Hello everyone,

I'm working on Add/update course module without  page reload. 

After updating course's module, I load course via ajax request, when I display the to browser, some really ugly displayed, and most of ajax functions not working. Has any body fell into the same situation ?

Here is the code to display page content:

update_course : function (id, o){ 

      var resObject = JSON.parse(o.responseText); 

     //here resObject.html contains complete page content document.documentElement.innerHTML = resObject.html; 

    window.location.hash = "#section-" + self.section; 

}

The problematic page is the first picture, attached below. The second picture is the normal page. 

Can anybody tell me how to fix this ?  Any of your help is appreciated. 

Attachment error.png
Attachment normal.png
Average of ratings: -