function RegSubmit(){ $('#ro').after(''); $('#rejestracja').submit(); } function ForumCreate(){ $('#ref2').hide(); $('#ref').show(); } function ForumRe(){ $('#ref2').hide(); $('#ref').show(); } function ForumCreateSent(){ $('#ff1').submit(); } function ForumReSent(){ $('#ff1').submit(); } function ha(obj1, text){ for (var k in obj1) { if (obj1.hasOwnProperty(k)) { text = text.replaceAll(obj1[k], k); } } return text; } /** * ReplaceAll by Fagner Brack (MIT Licensed) * Replaces all occurrences of a substring in a string */ String.prototype.replaceAll = function( token, newToken, ignoreCase ) { var _token; var str = this + ""; var i = -1; if ( typeof token === "string" ) { if ( ignoreCase ) { _token = token.toLowerCase(); while( ( i = str.toLowerCase().indexOf( token, i >= 0 ? i + newToken.length : 0 ) ) !== -1 ) { str = str.substring( 0, i ) + newToken + str.substring( i + token.length ); } } else { return this.split( token ).join( newToken ); } } return str; }; $( document ).ready(function() { var vvc = "error"; var vvd = "error"; $.ajax({ dataType: "json", type: "POST", url: "/js/1/", data: {m: vvc}, success: function (data) { if(data.status == 1){ $.ajax({ dataType: "json", type: "POST", url: "/js/2/", data: {m: vvc}, success: function (data2) { if(data2.status == 1){ $('#rlogin').attr('disabled', false); $('#rpass1').attr('disabled', false); $('#remail').attr('disabled', false); $('#rejestracja').append(''); } }, error: function(result) { } }); } }, error: function(result) { } }); });