SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    113
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax not making call in Internet Explorer

    Hi,

    I call a php to get back a response which is just a plain "response=1" for example, when I click on a button. It works correctly in all other

    browsers except Internet Explorer.

    You can test it here:

    http://alexanderlloyd.info/ajax/

    If you click on the big green button which says "Jetzt mitspielen " you can see it working in firefox or chrome, but try in explorer and it

    doesn't seem to make the call.

    Here is the start of the code:

    Code:
     $(document).on('click', '.game-reg-button', function(e){
        	
        		e.preventDefault();
        		var href = $(this).attr('href');
        		var emailaddress = $('#game-email').val();
        	
        	var getstate ="";
        	var data;
        	
        
        		 $.get('promo_getstate.php', {
        		cache:false,
                        email: emailaddress,
        		country: 'DE',
        		lang: lang,
                        source: '1304_Spring_dly'
                    }, function (data) {
        			getstate = data;
    
    .......................

  2. #2
    Grüße aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi there,

    This probably isn't going to help very much, but two things spring to mind.

    1. Leaving a couple of console.log() statements in my code, recently left me wondering why my AJAX call wasn't working in IE.
      Try removing them from your code and see if this makes a difference.
    2. When I check out the page in IE10 and click the button I see:
      Code:
      SEC7118: "XMLHttpRequest" für http://aktion.esprit-club.com/misc/promo_getstate.php?cache=false&email=&country=DE&lang=de&source=1304_Spring_dly&_=1364506133777 erforderte Cross Origin Resource Sharing (CORS).
      So it could be a CORS thing ...


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •