problem on ajax call
Posted
by praveen
on Stack Overflow
See other posts from Stack Overflow
or by praveen
Published on 2010-03-20T05:10:07Z
Indexed on
2010/03/20
5:11 UTC
Read the original article
Hit count: 459
mootools1.2
|AJAX
hi i am using mootools ajax request in my project. its works properly but when i make request for it aborted first time and second time request mad. consequently abortion of request increase by one at each click. my code is following
function addStepConfiguration(id,mystrip,comment,error,submitid) { // alert(id+'\n'+mystrip+'\n'+comment+'\n'+error+'\n'+submitid.value); $(id).addEvent('submit', function(e) { e.stop(); this.set('send', { onRequest:function(html){ $(submitid).setStyle('display','none'); loading_Img(); }, onComplete: function(responseText) { $('loading_img').innerHTML = ''; SplittedResText = responseText.split("|"); s //alert(SplittedResText); if(SplittedResText[1]=='undefined') { $(error).innerHTML=SplittedResText[0]; $(submitid).setStyle('display','block'); } else { $(comment).innerHTML=SplittedResText[0]; $(mystrip).set('class',SplittedResText[1]); //$(image).setProperty('src',SplittedResText[2]); removeMsg.delay(20,'',error); removeMsg.delay(3000,'',comment); $(submitid).setStyle('display','block'); } } }); this.send(); }); }
© Stack Overflow or respective owner