2014-08-30 5 views
0

Я рассмотрел несколько решений на SO, но никто, похоже, не работает или не адресует JQuery-Mobile, если я закончил Mobile, то postback отлично работает и обновление принято.ASP.NET кнопка postback не работает JQuery Mobile

У меня есть страница ASP.net, в которой я добавил виджеты JQuery и Datepicker. - при добавлении JQuery Mobile JS на страницу мобильная страница работает нормально, а у Datepicker есть добавленный JS-файл, чтобы он также функционировал. Однако кнопка на странице не работает, я сузил его до jquery.mobile-1.4.3.min.js

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css"> 
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script> 
<!--script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script--> 
<script src="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script> 

Кнопки находится в пределах <InsertItemTemplate>

 </InsertItemTemplate> 
     <ItemTemplate> 
        FDID: 
        <asp:Label ID="FDIDLabel" runat="server" Text='<%# Eval("FDID") %>'></asp:Label><br /> 
        CHOICE1: 
        <asp:Label ID="CHOICE1Label" runat="server" Text='<%# Bind("CHOICE1") %>'></asp:Label><br /> 
        CHOICE2: 
        <asp:Label ID="CHOICE2Label" runat="server" Text='<%# Bind("CHOICE2") %>'></asp:Label><br /> 
        CHOICE3: 
        <asp:Label ID="CHOICE3Label" runat="server" Text='<%# Bind("CHOICE3") %>'></asp:Label><br /> 
        CHOICE4: 
        <asp:Label ID="CHOICE4Label" runat="server" Text='<%# Bind("CHOICE4") %>'></asp:Label><br /> 
        CHOICE5: 
        <asp:Label ID="CHOICE5Label" runat="server" Text='<%# Bind("CHOICE5") %>'></asp:Label><br /> 
        CHOICE6: 
        <asp:Label ID="CHOICE6Label" runat="server" Text='<%# Bind("CHOICE6") %>'></asp:Label><br /> 
        IPADDRESS: 
        <asp:Label ID="IPADDRESSLabel" runat="server" Text='<%# Bind("IPADDRESS") %>'></asp:Label><br /> 
        PICKDATE: 
        <asp:Label ID="PICKDATELabel" runat="server" Text='<%# Bind("PICKDATE") %>'></asp:Label><br /> 
        <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" 
         Text="Edit"></asp:LinkButton> 
        <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" 
         Text="Delete"></asp:LinkButton> 
        <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" 
         Text="New"></asp:LinkButton> 
       </ItemTemplate> 
    </asp:FormView> 

не уверен, если он не имеет ничего общего с: ui-btn-active в mobile.js

+1

Отключить Ajax, добавив 'data-ajax =" false "на кнопку. – Omar

+0

только что обнаружил, что ему пришлось поставить его до загрузки «mobile.js» ... – BarclayVision

+0

только вопрос сейчас ... его показы как мобильный вид на рабочем столе сафари - но мой датпикер больше не работает в настольных браузерах Firefox или Chrome? – BarclayVision

ответ

0

Фактически это разрешило проблему после дальнейшего поиска.

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css"> 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css"> 
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> 
<script src="http://code.jquery.com/ui/1.11.1/jquery-ui.js"></script> 
<script type="text/javascript"> 
$(document).bind("mobileinit", function() { 
    $.mobile.ajaxEnabled = false; 
}); 
</script> 
<script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script> 
<script src="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script> 
+0

Пришлось переключиться с подключений CDN для скриптов и css на локально сохраненные js-файлы. Эта исправленная проблема с настольными браузерами, не работающими с JQuery Mobile, из-за https: смешанная с незащищенным подключением скриптов, которая блокировала скрипт. – BarclayVision

Смежные вопросы