/* This file uses prototypejs for improve simplicity of coding lines, some typical sample usages are: * Sample 1: $('objectId') sames with document.getElementById('objectId') * Sample 2: $('objectId').show() sames with document.getElementById('objectId').style.display = 'block' AND .hide() sames with .style.display = 'none' * More info: http://www.prototypejs.org/learn/extensions, http://en.wikipedia.org/wiki/Prototype_JavaScript_Framework */ //////////////////////////////AJAX FUNCTIONS/////////////////////////////////// function PrintAdvs7() { // Displays a image during the AJAX call //DisplayUpdateImage(true); // Ajax call. Service is the Web Service we registered in ScriptManager // and as you can see, we can directly call our WebMethod. Isn't it nice ? :) // We also add 3 events : one when process is completed, another when a timeout occurs, // and a last one if an error occurs. ajaxAdv.GetMultiAdvertisementByPos(7, OnComplete7, OnTimeout7, OnError7); } // Called when Ajax request is done function OnComplete7(result, eventArgs) { fRenderHtml7(result); } // Informs user that a timeout occured function OnTimeout7(result) { //DisplayUpdateImage(false); //DisplayErrorMessage("Can't connect to WebServer"); } // Informs user that an error occured function OnError7(result) { //DisplayErrorMessage(result.get_message()); //DisplayUpdateImage(false); } //CALL PrintAdvs7(); ///////////////////////////////MAIN FUNCTIONS///////////////////////////////// function fRenderHtml7(data) { var containerTable = document.getElementById('tblAdv_7'); if (containerTable==null) return; //you have to give the table name correctly for (var i=0; i'; } }