I have a script that is used to validate a credit card and then runs a personal script that encrypts the information for storage upon a database.
however
I have variables that control where the error messages and content that is return via ajax goes
now the content that is returned when the card is process is the query need for the personal encryption script
however
the variables dont change they stay at the default.
the credit card script works fine and the error messages from it goes where its suppose to but it doesnt change the variables after the second ajax call
Code:$('#settings form').submit(function (e){ e.preventDefault(); var id = $(this).attr('id'); var type = $(this).serialize(); if(id == 'credit' && type != 'type=edit'){ var formType = 'POST'; var formLocation = "ajax/ecommerce/paymentProcess.php"; var extra = "&process=AUTH_ONLY&amount=0.01"; }else{ var formType = 'GET'; var formLocation = 'ajax/account/'+id+'.php'; var extra = ''; } $.ajax({ type: formType, data: $(this).serialize() + extra, url:formLocation, success: function(msg){ var statusMsg; var content; statusMsg = msg.split("<!--|split|-->")[0]; content = msg.split("<!--|split|-->")[1]; if(id == 'credit' && formType == "ajax/ecommerce/paymentProcess.php"){ $.ajax({ type: 'GET', data: content, url:'ajax/account/credit.php', success: function(msg){ statusMsg = msg.split("<!--|split|-->")[0]; content = msg.split("<!--|split|-->")[1]; alert(content); } }); } updateWindow(statusMsg); $('#'+id).html(content); } }); });


Reply With Quote
Bookmarks