簡體   English   中英

目錄列表隨機顯示在對話框的jQuery UI選項卡中

[英]Directory Listing randomly shows up in a jQuery UI tabs inside a Dialog

我想在對話框中顯示jQuery UI選項卡,但是它無故顯示了我的asp.net應用程序的目錄列表。 它還會更改我頁面的CSS。 這里發生了什么?

屏幕截圖

使用Javascript:

$("#editAddress").click(function () {
        var personId = window.location.search.slice(1).split('=')[1];
        //Use Get API to fill the form:
        $.getJSON('/ipad/api/Address/' + personId, function (data) {
            var tabs = $('#tabs');
            $("#dialogAddress").empty().append(tabs);
            $("#dialogAddress").dialog("open");
            tabs.show();
            tabs.tabs();
        });    
    });

HTML:

<div id="tabs" style="display:none">      
      <ul>
        <li><a href="#tabs-1">Tab 1</a></li>
      </ul>
      <div id="tabs-1">
        <fieldset>
        <label for="address1">
            Address1:</label>
            <input type="text" name="address1" id="address1" value="" />
        <label for="city">
            City:</label>
            <input type="text" name="city" id="city" value="" />
        <label for="country">
            Country:</label>
             <input type="text" name="country" id="country" value="" />
        </fieldset>
      </div>
</div>

這可以通過在隱藏代碼中設置超鏈接href來解決。 使用ASCX(用戶控件)時出現此類問題。

我從這里得到解決方案: asp.net用戶控件,讓htmlAnchor解析為href =“#”

希望這可以幫助。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM