[ Index ] |
PHP Cross Reference of MyBB |
[Summary view] [Print] [Text view]
1 var captcha = { 2 refresh: function() 3 { 4 var imagehash = $('imagehash').value; 5 this.spinner = new ActivityIndicator("body", {image: imagepath + "/spinner_big.gif"}); 6 new Ajax.Request('xmlhttp.php?action=refresh_captcha&imagehash='+imagehash, { 7 method: 'get', 8 onComplete: function(request) { captcha.refresh_complete(request); } 9 }); 10 return false; 11 }, 12 13 refresh_complete: function(request) 14 { 15 if(request.responseText.match(/<error>(.*)<\/error>/)) 16 { 17 message = request.responseText.match(/<error>(.*)<\/error>/); 18 19 if(!message[1]) 20 { 21 message[1] = "An unknown error occurred."; 22 } 23 24 alert('There was an error fetching the new captcha.\n\n'+message[1]); 25 } 26 else if(request.responseText) 27 { 28 $('captcha_img').src = "captcha.php?action=regimage&imagehash="+request.responseText; 29 $('imagehash').value = request.responseText; 30 } 31 32 if(this.spinner) 33 { 34 this.spinner.destroy(); 35 this.spinner = ''; 36 } 37 38 Element.removeClassName('imagestring_status', "validation_success"); 39 Element.removeClassName('imagestring_status', "validation_error"); 40 Element.removeClassName('imagestring_status', "validation_loading"); 41 $('imagestring_status').innerHTML = ''; 42 $('imagestring_status').hide(); 43 $('imagestring').className = 'textbox'; 44 $('imagestring').value = ''; 45 } 46 };
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Oct 8 19:19:50 2013 | Cross-referenced by PHPXref 0.7.1 |