0
我的表格後,負載頁面提交與阿賈克斯不工作 我對負載頁面代碼:後阿賈克斯形式submition加載頁面無法正常工作
問題:後負載阿賈克斯形式modalbox元素
function account_list(url)
{
\t $.ajax({
\t \t type: 'get',
\t \t url: url,
\t \t beforeSend: function() {
\t \t \t parsysm.loading(1);
\t \t },
\t \t success: function(data) {
\t \t \t $('div#option-id-1').slideUp('slow', function(){
\t \t \t \t $(this).html(data).slideDown('slow');
\t \t \t });
\t \t },
\t \t error: function() {
\t \t \t alert('Error Report!');
\t \t },
\t \t complete: function() {
\t \t \t parsysm.loading(0);
\t \t }
\t })
}
和加載頁面動作:
<form id="form-options-show" class="form-horizontal ">
<div class="form-body">
<form id="form-options-show" class="fast-panel">
چینش »
<select class="inputcl1" name="order" size="1">
<option value="DESC"[desc] selected="selected"[/desc]>نزولی</option>
<option value="ASC"[asc] selected="selected"[/asc]>صعودی</option>
</select>
تعداد کاربران در صفحه »
<input name="total" class="inputcl1" type="text" style="width:25px;text-align:center" value="{total}" maxlength="3" />
جستجو »
<input name="search" class="inputcl1" type="text" style="width:150px" value="{search}" dir="ltr" />
[pages]
صفحه »
<select name="page" class="inputcl1" size="1">
[for pages]<option value="{number}"[selected] selected="selected"[/selected]>{number}</option>[/for pages]
</select>
[/pages]
<input class="btn green" type="button" value="نمایش" onclick="account_list('{admin-page}&addon=account&'+parsysm.serialize('form-options-show'))" />
<input name="sort" type="hidden" value="{sort}" />
</form>
但經過負載頁面modalbox動作不靈 - >模框代碼:
<div class="modal fade" id="portlet-sms{id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
\t \t \t \t <div class="modal-dialog">
\t \t \t \t \t <div class="modal-content">
\t \t \t \t \t \t <div class="modal-header">
\t \t \t \t \t \t \t <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
\t \t \t \t \t \t \t <h4 class="modal-title">ارسال پیامک به {name-show}</h4>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="modal-body">
<div id="sms-ajax{id}"></div>
<form id="sms-form{id}" onsubmit="sms_send({id});return false">
<input type="tel" name="singlesms[number]" value="{mobile}" class="form-control" maxlength="11" placeholder="09-- --- -- --" disabled /><br>
<textarea class="form-control" name="singlesms[msg]" placeholder="متن خود را وارد نمایید"></textarea>
\t \t \t \t \t \t </div>
\t \t \t \t \t \t <div class="modal-footer">
\t <input type="submit" class="btn blue" value="ارسال پیام" />
\t \t \t \t \t \t \t
\t \t \t \t \t \t \t <button type="button" class="btn default" data-dismiss="modal">بستن</button></form>
\t \t \t \t \t \t </div>
\t \t \t \t \t </div>
\t \t \t \t \t <!-- /.modal-content -->
\t \t \t \t </div>
\t \t \t \t <!-- /.modal-dialog -->
\t \t \t </div>
尋求調試幫助的問題(「爲什麼這個代碼不工作?」)必須包含所需的行爲,特定的問題或錯誤以及在問題本身中重現問題所需的最短代碼。你的問題沒有明確的問題陳述,缺乏信息... – Farside