I am trying to create a syntax highlighter script. I tried using my script on a code with 10 thousand lines and all I see is a blank page while it is loading. Everything wil
Not sure exactly how much data is being brought in...but what if on document ready you ran a jquery ajax call and used the completed method to run your highlighter function? If there is a lot of data it will be a slower page load.
Anyways would like similar to this
$.ajax({
type: "POST",
url: "Where data is actually stored",
data: { ChannelTypeID: ChannelTypeID },
datatype: "html",
beforeSend: function () {
},
success: function (myHTML) {
$('body').html(myHTML);
},
error: function () {
alert("Ajax request was unsuccessful");
},
complete: function () {
highlighterFunction();
}
});
The complete method specifies a function to be run when an AJAX request completes. Hopefully the success will fire early enough to push the data and allow your highlight to work properly