FF または Chrome を使用して .aspx ページ内でうまく機能する次の Jquery コードがあります。ただし、IE9 では、ダイアログ ボックスを開くはずのボタンをクリックすると、ページ全体が更新されたように見え、何も起こりません。
私はこれらのバージョンを使用しています:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
これが私のjqueryです:
$(function () {
$("#btnSearch").click(function () {
$("#gvBox").show();
});
$("#dialog-form").dialog({
autoOpen: false,
height: 400,
width: 650,
modal: true,
buttons: {
"Transfer": function () {
var bValid = true;
allFields.removeClass("ui-state-error");
if (bValid) {
$(this).dialog("close");
}
},
Cancel: function () {
$(this).dialog("close");
}
},
close: function () {
allFields.val("").removeClass("ui-state-error");
},
open: function () {
{
$(this).parent().appendTo($("form:first"));
}
}
});
$("#btnTransfer").button().click(function () {
$("#dialog-form").dialog("open");
return false;
});
return false;
});
ダイアログボックスを開くボタンは次のとおりです。
<button id="btnTransfer">Transfer Ownership</button>
これを IE で動作させるための秘訣はありますか?