0

Hello I have been trying to fix an issue I'm having with IE It works and passes all the data with Chrome and Firefox but messes up with IE

 $.ajaxSetup({
      cache: false
 });

 var dataString = 'firstname=' + firstname + '&lastname=' + lastname + '&areacode=' +      areacode + '&phonenumber=' + phonenumber + '&emailaddress=' + emailaddress + '&confirmemail=' + confirmemail + '&password=' + password + '&streetaddress=' + streetaddress + '&streetaddress2=' + streetaddress2 + '&city=' + city + '&state=' + state + '&zipcode=' + zipcode + '&month=' + month + '&day=' + day + '&year=' + year + '&services=' + services + '&agreement=' + agreement; 
  //alert(dataString); 
 // alert(services); 
 //var d = new Date(); 
  $.ajax({
      cache: false, 
         type: "POST",
        url: "http://www.vectorcreditsolutions.com/js/process.php",
        data: dataString,
  //  dataType: ($.browser.msie) ? "text" : "xml",  
    success: function(ret) {
        window.location.href ="http://www.vectorcreditsolutions.com/thankyou.html";
    }
    });
    return false;
     });

and i get an http 405 issue with IE please any input would help thank you

user1154295
  • 85
  • 1
  • 2
  • 8
  • Do you have to use the full URL? Is the script running on a different domain? – James M Jan 24 '12 at 19:35
  • 1
    Duplicate of (http://stackoverflow.com/questions/6523162/jquery-ajax-get-returns-405-method-not-allowed) You cannot make cross-domain requests using standard ajax – Pastor Bones Jan 24 '12 at 19:36
  • 1
    Does it work if you switch method to GET? also, what version of IE are you using? (IE6 has several known issues). – Ben D Jan 24 '12 at 19:36
  • @pastor: Question states that everything works in Chrome and Firefox, so cross-domain permissions issues seem unlikely, though the code would benefit from relative paths (/js/process.php) – Ben D Jan 24 '12 at 19:37
  • 1
    The 405 error may indicate that you need to use a "GET" request instead of "POST" - have you tried this? – Kyle Jan 24 '12 at 19:38
  • I tried using the get method now and the http 405 error is gone now – user1154295 Jan 24 '12 at 20:13

1 Answers1

3

Your param format seems unusual, I would avoid using & for a post request

Try this

   data: { 
        'firstname': firstname, 
        'lastname': lastname,
         .....
    }
Liam
  • 2,837
  • 23
  • 36