我目前正在開發基於asp.net和vb.net的web應用程序。將colorbox彈出框轉換爲正常彈出框
此應用程序以前使用其他用戶開發和使用各種類型的腳本,如淘汰賽的Javascript,AJAX,JSON,JQuery的等
有一些顏色框彈出這是我現在要在正常彈出轉換。但因爲我不擅長ajax和KO-JS,所以我無法將其轉換。
下面的代碼打開彈出頁面(send-communication.aspx)作爲一個顏色框彈出,當有人點擊「繼續」,並且工作正常。但我只是想打開它作爲一個正常的彈出窗口。
的鏈接按鈕的代碼是
<%@ Page Title="" Language="VB" MasterPageFile="~/_resx/E4.master" AutoEventWireup="false" CodeFile="new.aspx.vb" Inherits="E4_Jobs_Details_Interview_New" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
<input type="hidden" name="vid" id="vid" value="<%= Vacancy.ID.ToString()%>" />
<a href="#" id="saveInt" class="btn">Continue</a>
</asp:Content>
而且頁面的腳本
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ScriptContent">
<script type="text/javascript" charset="utf-8">
$(function() {
var vid = $('#vid').val(), intId = $('#intId').val(), singleBooking = $('#singleInterview').val();
$('.int-stage').change(function() { updateCandidates(); });
$('#saveInt').click(function() { saveInterview(); });
var saveInterview = function() {
var applicants = [];
$('.int-candidates option:selected').each(function (i, k) {
applicants.push($(k).val());
});
if (validateInterview(applicants, vm.interviewers(), vm.interviewTimes())) {
$.ajax({
type: "POST",
url: '/_services/UtilityService.asmx/NewInterview',
data: "{'id':" + intId + ",'stage': " + $('.int-stage > option:selected').val() + ",'singleBooking':" + singleBooking + ",'reSchedule':'false', 'apps':[" + applicants.join() + "],'location':'" + $('.int-location').val() + "', 'description':'" + $('.int-description').val().replace("'", "'") + "'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
cache: true,
success: function (r) {
if((parseInt(r.d))>0) {
var commUrl = "/e4/communication/send-communication.aspx?templatetypeid=1&communicationtemplateid=" + $('#intTemplate').val() + "&applicationid=" + applicants.join() + "&interviewid=" + r.d;
$.colorbox({ width: '900px', height: '90%', iframe: true, href: commUrl, open: true, overlayClose: false });
}
}
});
return false;
}
};
});
</script>
我是新的程序員,我當它是的情況下很愚蠢jquery和KO-JS。
任何一個可以建議我怎麼能打開網頁(發送-sommunication.aspx)作爲一個正常彈出,而不是顏色框彈出
感謝
你能解釋一下「普通」彈出窗口的意思嗎?你想在新窗口或標籤頁上打開頁面嗎? – Chris 2014-11-05 11:47:28
在新窗口中彈出。不在標籤上。 – Bashabi 2014-11-05 12:06:51