ajxpg =function(page,div) { $('loading_div').show(); new Ajax.Updater(div, page, { method: 'get', onComplete: function(transport){ //alert(transport.responseText) $('loading_div').hide(); }, postBody:'content=1', evalScripts: true }); return false; };ajxfrm=function (frm,div) { $('loading_div').show(); if(document.getElementById(frm)) { var form = $(frm); this.method = form.method; this.act=form.action; new Ajax.Updater(div, this.act, {asynchronous:true, method: this.method, postBody:Form.serialize($(frm))+"&rndval="+new Date().getTime(), onComplete: function(transport){ //alert(transport.responseText) $('loading_div').hide(); }, evalScripts: true}); $('loading_div').hide(); } return false; };