我一直在嘗試兩天,以獲得ColorBox返回到相同的打開框後的結果,但它只是不會這樣做。ColorBox JQuery表格插件發佈到相同的顏色盒
我正在使用Jquery表單插件從ColorBox發佈。它似乎在IE 8中工作,但不是Safari或FireFox。
在IE 8中,它返回來自帖子頁面「action」的結果,並將結果返回到同一個ColorBox,但是在FF和Safari中,它關閉了該框並位於加載頁面上(即process1.php)?
- 我有一個頁面說哪個加載彩盒的onLoad 「process1.php」(它這樣做沒有問題)
加載頁面彩盒代碼爲process1.php:
var $j = jQuery.noConflict();
$j(document).ready(function() {
$j.fn.colorbox({
href:"process2.php",
escKey: false,
overlayClose: false,
width: "60%",
height: 350,
title: "Process Secure Order",
open:true
});
});
-
- 在頁面加載時,它將加載顯示錶單的「process2.php」,以便用戶提交數據。
這是我的JQuery形式插件代碼:
var $j = jQuery.noConflict();
$j(document).ready(function() {
var options = {
beforeSubmit: showSpinner,
success: showResponse,
//resetForm: true,
timeout: 3000,
target: '#output1'
};
function showSpinner() {
$j('#sterms, #accept, #decline, #side-cart').hide();
$j('#working').show().html('Please Wait');
return true;
};
function showResponse(){
$j('#working').hide();
$j('#result').show();
return true;
};
// bind form using 'ajaxForm'
$j('#secure_process01').ajaxForm(options);
});
它張貼罰款,然後就試圖與出彩盒開幕重新加載相同頁面加載。
它讓我難住爲什麼它在IE中工作,沒有別的,任何幫助,將不勝感激。
使用jQuery 1.5.2(JQuery的表格插件在不與任何更高的工作有權限問題) 參考的jQuery表單插件http://jquery.malsup.com/form/#ajaxForm