我想要一個鏈接在彈出窗口中顯示一個div。讓一個鏈接在彈出窗口中顯示一個div
這是我的我的鏈接:
<li><a class="newAttachmentType" onclick="getFiles(true)">Move to somewhere</a></li>
,這是我試圖打電話放入彈出的DIV:
<div id="ddlFiles">
<label>
Select new CaseFile:</label>
<asp:DropDownList runat="server" ID="ddlCaseFilesNew" DataSourceID="dsCaseFiles"
DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px" />
<label>
Select old CaseFile:</label>
<asp:DropDownList runat="server" ID="ddlCaseFilesOld" DataSourceID="dsCaseFiles"
DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" Width="300px" />
</div>
這是我在到目前爲止已經試過了「 getFiles()「:
$('.newAttachmentType').click(function() {
$('#newAttachmentDialog').dialog({
autoOpen: true,
height: 'auto',
width: 'auto',
modal: true,
buttons: {
"Save": function() {
var attachmentName = $('#txtNewAttachmentName').val();
if (attachmentName != "") {
var res;
PageMethods.addNewAttachmentType(attachmentName, reloadAttachmentTypes, res);
$(this).dialog('close');
}
},
Cancel: function() {
$(this).dialog('close');
}
},
beforeClose: function() { $('#txtNewAttachmentName').val(''); }
});
});
爲什麼你有'onclick'屬性和jQuery綁定的事件處理程序? –