我不得不選擇用戶在表單中籤名。他們可以提交或取消。如果他們點擊提交,然後他們得到這樣的:Jquery對話框表單提交
,如果他們取消他們得到這樣的:
我有個小問題,我並不介意,但會打擾我的上司(這反過來會打擾我-_-)
如果您發現確認對話框的彈出窗口中的[x]不合適,因爲它不在x框中居中,而是位於其外部,並且我不知道爲什麼這可能會發生。
這是我的JQ:
<script>
$(document).on('submit', "#signinform", function(e)
{
e.preventDefault();
var href = '<?php echo base_url();?>studentlogin_controller/agree';
$("#dialog-confirm").dialog(
{
resizable: false,
draggable: false,
height: 310,
width: 500,
modal: true,
buttons:
{
"Cancel": function()
{
$(this).dialog("close");
},
"Enter Queue": function()
{
window.location.href = href;
}
}
});
});
$(document).on('click', "#Cancel", function(e)
{
e.preventDefault();
var href = '<?php echo base_url();?>studentlogin_controller/studentlogin';
$("#dialog-noconfirm").dialog(
{
resizable: false,
draggable: false,
height: 310,
width: 500,
modal: true,
buttons:
{
"Cancel": function()
{
$(this).dialog("close");
},
"Go Back": function()
{
window.location.href = href;
}
}
});
});
</script>
而我的HTML:
<div id="dialog-confirm" title="Please Confirm" style="display: none;">
<ul>
<li>By clicking <FONT COLOR="red">"Enter Queue"</FONT> counselors will be notified that you here - please take a seat</li>
<br>
<li>If You click <FONT COLOR="red">"Cancel"</FONT> you will not be inserted into the Student Queue</li>
</ul>
</div>
<div id="dialog-noconfirm" title="Please Confirm" style="display: none;">
<ul>
<li>By clicking <FONT COLOR="red">"Go Back"</FONT> your information will be removed from the current session</li>
<br>
<li>If You click <FONT COLOR="red">"Cancel"</FONT> your information will still be active and you will stay on the current page</li>
</ul>
</div>
這是我的主題包括和CSS:
<link rel="stylesheet" href="<?php echo base_url(); ?>css/mainstyle.css" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url(); ?>css/secondarystyles.css" type="text/css"/>
<link rel="stylesheet" href="<?php echo base_url(); ?>javascript/themes/smoothness/jquery-ui-1.8.4.custom.css"/>
<script src="<?php echo base_url(); ?>javascript/js/jquery.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>javascript/js/jquery-ui-1.10.2.custom.js" type="text/javascript"></script>
,這是谷歌瀏覽器發生。
另外我不能使用jsfiddle,因爲我的一些html也有php。所以希望這是足夠的信息。 – 2013-05-12 13:56:50
你有開發環境鏈接,你可以分享? – karthikr 2013-05-12 13:58:35