i using jquery ajax.
below jquery code:
$.ajax({ type: "post", url: "http://stackoverflow.com/login.aspx", // send login info page data: str, success: function(result) { //$("#logindetails").ajaxcomplete(function(event, request, settings) // { // show 'submit' button $('#loginbutton').show(); // hide gif spinning rotator $('#ajaxloading').hide(); var reslength = $.trim(result).length; if(reslength!=0) { var arr = result.split(","); var fname = arr[0]; var lname = arr[1]; var activecardno = arr[2]; var multipletier = arr[3]; var activestatus = arr[4]; var access = arr[5]; if(access!='' && access!='undefined') // login ok? { $('.validatetips').hide(); var login_response = '<div id="logged_in">' + '<div style="width: 350px; float: left; margin-left: 80px;">' + '<div style="width: 40px; float: left;">' + '<img style="margin: 22px 0px 10px 0px;" align="absmiddle" src="system/images/ajax-loader.gif">' + '</div>' + '<div style="margin: 24px 0px 0px 10px; float: right; width: 300px;">'+ "you logged in! <br /> please wait while you're redirected...</div></div>"; $('#loginbutton').hide(); $('#closebtn').hide(); $('#divmember').text(fname +' '+ lname); $('#spnskywardsno').text(activecardno); $('#spntierstatus').text(multipletier); $("#ui-dialog-title-skywardslogin").text(getdatafromresourcefile('pleasewait')); $('#divsuccesslogin').html(login_response); $('#divsuccesslogin').show(); $('#logindetails').hide(); //$(this).html(login_response); // refers 'status' // after 3 seconds redirect settimeout(closedialog, 3000); } } else// error? { var login_response = getdatafromresourcefile('invalidusername'); $('.validatetips').html(login_response); } //}); } });
the above code works perfect if going http request, example if on http://stackoverflow.com , have above call login page i.e. http://stackoverflow.com/login.aspx works fine, when go https request example https://stackoverflow.com/login.aspx giving "ns_error_dom_bad_uri", please suggest how can fix issue!
Comments
Post a Comment