开发者

T&C Checkbox IE Issue

I'm having an issue on the T&C checkbox in IE. Even if user did't checked the checkbox and they will still be able to pass through. FF & Chrome works fine. Only IE is facing this issue, please help me to have a look at the code.

<script> function accepttermandconditions() {
if(!accepttermandconditions_top()){ return false;}
<?php if($General->is_show_term_conditions()){?>
if(document.getElementById('termsandconditio开发者_开发知识库ns').checked){
    return true;
}else{
    alert('<?php echo CHECKOUT_JS_TERMS_CONDITIONS_MSG;?>');
    document.getElementById('termsandconditions').focus();
    return false;
}
<?php
}
?>
if(!accepttermandconditions_bottom()){ return false;} }

Hope someone really can help me.

Thank you.


For whatever reason, it sounds like IE is not executing your JavaScript. The easiest way to find the answer is to debug it in IE. If you're using IE8+, great, it has an excellent debugger built-in. If using IE7 or less, then you'll need the Visual Studio debugger or the one that comes with Microsoft Office.

EDIT: (Seen the page running now)

You have this at the bottom of the page:

<script type="text/javascript">
$().ready(function() {
    if(eval(document.getElementById('coda-slider-1')))
    {
        $('#coda-slider-1').codaSlider();
        //jQuery.noConflict(); var $j = jQuery;
    }
}); 
</script>

Internet Explorer fails here at the start. It says "Object doesn't support this property or method" - which is because $ is undefined.

Not sure why this is broken in IE only, because you have jQuery.noConflict() earlier in the page, which un-defines the $ object. You should still be able to use jQuery().ready in the above script instead of $().ready.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜