여기에 비슷한 문제가 있습니다 : Prior jQuery UI Dialogs become nonresponsive....여러 jQuery UI 대화 상자 및 하이퍼 링크 문제
다음은 문제의 원인입니다. 두 번째 대화 상자를 연 다음 두 번째 대화 상자를 닫은 다음 두 번째 대화 상자를 닫으면 첫 번째 대화 상자의 하이퍼 링크가 더 이상 작동하지 않습니다. 여기
는 대화 상자에 대한 코드입니다 :<script type="text/javascript">
$(function()
{
$("#PropertyDialog").dialog({
autoOpen: false,
modal: true,
position: ['center',100],
resizable: false,
height: 'auto',
width: 700
});
});
function ShowPropertyDetailsDialog(strPropertyId)
{
// set the html of the div
LoadPropertyDialogHtml(strPropertyId);
// open the dialog
$('#PropertyDialog').dialog('open');
}
</script>
<div id="PropertyDialog" title="Property Details">
</div>
<script type="text/javascript">
$(function()
{
$("#PropertyImageDialog").dialog({
autoOpen: false,
modal: true,
position: ['center',75],
resizable: false,
height: 'auto',
width: 650
});
});
function ShowImageDialog(strTitle, strLinkUrl)
{
var dialogDiv = $get("PropertyImageDialog");
dialogDiv.innerHTML = "<img src='" + strLinkUrl + "' alt='' width='600' />";
$("#PropertyImageDialog").dialog"option","title",strTitle);
// open the dialog
$('#PropertyImageDialog').dialog('open');
}
</script>
<div id="PropertyImageDialog" title="Property Image">
</div>
LoadPropertyDialogHtml
기능은 ShowImageDialog
의 처음 두 줄과 비슷한 않습니다 - PropertyDialog
DIV의 내용을 설정합니다.
보통 링크의 경우 window.location
을 사용하고 새 창 링크의 경우 window.open
을 사용하여 링크 기능을 대체 할 수 있지만 작동하는 하이퍼 링크를 얻고 싶습니다. 왜 이런 일이 발생하는지 이해하고 싶습니다.