Error when calling .diablog () on IE8 & IE7
I am getting an error message on IE8 & IE7 when calling .dialog().
The error message I am getting from IE console is:
SCRIPT438: Object doesn't support this property or method
jquery-1.7.2.min.js, line 2 character 21784
My code is:
- // Add to cart button clicked
$tablePanel.on('click', '.AddToCartButton', function (e) { $('#mdlPopup_backgroundElement').show(); var optionId = +e.target.getAttribute('optionid'); var categoryId = +e.target.getAttribute('categoryid'); // Get the product shoptCityId from previous <tr> var $baseProdTr = $(e.target).closest('td.info_row').parent().prev(); var shopCityId = +$baseProdTr.attr('shopcityid'); // For Dev! if (isNaN(shopCityId)) { alert('Error:\nFailed to get the shopCityId value from the base product <tr>'); return; } // Close the product <tr> in the table oTable.fnClose($baseProdTr[0]); var shopDisplay = $baseProdTr.find('b.shopDisplay').text(); $.post(urlAddToCart, { productOptionId: optionId, shopCityId: shopCityId, shopDisplay: shopDisplay, categoryId: categoryId }, function (result) { if (result === 'EmptyView') { updateCartItemsCount(); $('#mdlPopup_backgroundElement').hide(); return; } var $input = $(result).filter('#hdnModalProps'); var className = $input.attr('classval'); var width = $input.attr('widthval'); var height = $input.attr('heightval'); // --------- the error occurred here: ------------------ $modalDialog = $(result).dialog({ modal: true, draggable: false, resizable: false, width: width, dialogClass: className + 'noTitleDialog' }); $('#mdlPopup_backgroundElement').hide(); });
How can I solve this?
Thanks.