1

Description: jquery-1.3.2.min.js, line 19 character 27021

Line: J.open(G,M.url,M.async)

Website on localhost (denwer). IE 9.

No problems with Chrome, Opera, Safari, Mozila.

Code:

function myFunction() {
    $.ajax({
        type: "POST",
        url: "http://mysite.com/license/index.php",
        data: "key=<?php echo $c_hash; ?>",
        cache: true,
        success: function(response){
            if (response === '<?php echo $c_hash; ?>') {
                $("#thisdiv").html('<table><tr><td align="left"><a href="<?php echo str_replace("&", "&amp;", $back); ?>" class="button" style="text-decoration: none;"><span><?php echo $button_back; ?></span></a></td><td align="right"><a onclick="formSubmit();" class="button"><span><?php echo $button; ?></span></a></td></tr></table>');
            } else {
                $("#thisdiv").html('<div style="display: table;"><div><p style="margin: 0;">There is license check error.</p></div><div style="float: right;"><a href="<?php echo str_replace("&", "&amp;", $back); ?>" class="button" style="text-decoration: none;"><span><?php echo $button; ?></span></a></div></div>');
            }
        }, 
        error: function(){
                $("#thisdiv").html('<div style="display: table;"><div><p style="margin: 0;">There is license check error.</p></div><div style="float: right;"><a href="<?php echo str_replace("&", "&amp;", $back); ?>" class="button" style="text-decoration: none;"><span><?php echo $button; ?></span></a></div></div>');
        }
    });
};
myFunction();

Could anybody help?

ilyasavitski
  • 134
  • 4
  • 10
  • this looks like a problem with trying to use jquery post method to do a cross domain request.. browser permissions wont allow you to do that, not sure how it worked on other browsers though. u will have to use JSONP for this – redDevil Aug 26 '12 at 19:21
  • Could you explain how to do this? Have tried - dataType: 'json' - same result. – ilyasavitski Aug 26 '12 at 19:47
  • you will have to use dataType: 'jsonp' , also your sever side code should wrap the json response in the jsonp callback method, please refer http://stackoverflow.com/questions/2681466/jsonp-with-jquery for more examples – redDevil Aug 26 '12 at 20:01
  • Have done with xDomainRequest. – ilyasavitski Sep 14 '12 at 23:20

0 Answers0