load scroll_y.html with ajax

load scroll_y.html with ajax

shamigshamig Posts: 1Questions: 0Answers: 0
edited August 2011 in General
Hi I recently started trying out with this jquery.
I am trying to do a basic example.

I have a page with input button and a a division "main_div". when I click the button I need to load the scroll_y html (the given example) into the main_div division. the data is loaded but the scroll bar and sorting facilities are disabled.

The only difference I did to the scroll_y html is i changed the initialization code to
[code]
$(document).ready(function() {
alert("sdfdfsf")
$('#example').dataTable( {
"bProcessing": true,

"sAjaxSource": '../ajax/sources/arrays.txt'
} );
} );

[/code]

I request the page through,

[code]
function fetchtable(){


var url = "scroll_y.html"

alert(url)
var ThisHTTPRequest = getobject();
ThisHTTPRequest.onreadystatechange = function()
{
if (ThisHTTPRequest.readyState == 4)
{

var res = ThisHTTPRequest.responseText

document.getElementById('main_div').innerHTML =res


}
}
ThisHTTPRequest.open("GET",url,true);
ThisHTTPRequest.send(null);


}




[/code]


I really appreciate some help in this.


Regards,

Shamali
This discussion has been closed.