jQuery .ajax method in IE7 & IE6 not working but working fine in Firefox

后端 未结 5 1089
情深已故
情深已故 2020-12-06 14:43

This relates to my previous post:

jQuery .load Method causing page refresh AJAX

I changed my implmentation to use the .ajax method instead of .load and it wo

5条回答
  •  误落风尘
    2020-12-06 15:16

    I accidentally worked out what the issue was.

    The link referenced in this variable:

    var $tabValue = $(this).attr('href');
    

    Had a hash value on the end like so:

    https://bupacouk.bwa.local.internal.bupa.co.uk/cash-plan-quote/quoteAction.do?getBenefitLevelDetails=getBenefitLevelDetails&productPolicyId=7850#a1
    

    This cause the AJAX to fall over in bothe versions of IE.

    Using the following code:

    var $withoutHash = $tabValue.substr(0,$tabValue.indexOf('#'));
    

    Getrs rid of it and it now works :)

提交回复
热议问题