0 0

jquery的dialog方法不显示也不报错10

jsp页面里引入了jquery,其他的页面可以正常显示dialog,这个页面却始终不显示,也不报错,用IE调试了,代码能执行完整,$("#dialog-message-fileDelete").dialog("open");却始终不显示,用chrome,Firefox始终找不到原因,求大神给指导一下,小弟不甚感激!主要代码如下:
声明文件:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"/>
引入的js:
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript"
src="<%=request.getContextPath()%>/js/jquery-ui-1.10.3.custom.min.js"></script>
<link rel="stylesheet"
href="<%=request.getContextPath()%>/css/blitzer/jquery-ui-1.10.3.custom.min.css" />
<script type="text/javascript"
src="<%=request.getContextPath()%>/scripts/js/jquery/jquery.jSelectDate.js"></script>
<script src="<%=request.getContextPath()%>/scripts/js-recruit/png.js"
type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/scripts/js-recruit/ceng.js"
type="text/javascript"></script>
<link href="<%=request.getContextPath()%>/css/style-recruit.css"
rel="stylesheet" type="text/css" />
js代码:
<script type="text/JavaScript">
function checkSign(){
var sign = document.getElementsByName("signName");
for(var i=0;i<sign.length;i++){
var val = sign[i].value;
if(val=="agree"){
if(sign[i].checked){
document.forms[0].submitBtn.disabled=false;
}else{
document.forms[0].submitBtn.disabled=true;
}
}
}
}
function doBaseInfo() {
var url= "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentBaseInfoInit.do";
document.forms[0].action = url;
document.forms[0].submit();
}
function doApplyInfo() {
var url= "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentApplyInfoInit.do";
document.forms[0].action = url;
document.forms[0].submit();
}
function doFileInfo() {
var url= "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentFileInfoInit.do";
document.forms[0].action = url;
document.forms[0].submit();
}
function showNotice() {
var url= "<%=request.getContextPath()%>/foreignrecruit/recruit_note_get_note_list.do";
document.forms[0].action = url;
document.forms[0].submit();
}
function doLogout() {
var url = "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentLogout.do";
document.forms[0].action = url;
$("#dialog-message-logout").dialog("open");
}
function showStatus() {
$("#dialog-message").dialog( "open" );
}
function help() {
$("#dialog-message-help").dialog( "open" );
}
function getCollege(){
var teachingLanguage =document.forms[0].teachingLanguage.value;
var exameeType =document.forms[0].exameeType.value;
if(exameeType==""){
       return false;
}  
if(teachingLanguage==""){
       return false;
}
    var exameeId=document.forms[0].userId.value;
   document.forms[0].action = "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentStuGetCollegeSubmit.do?exameeId=" + exameeId+"&teachingLanguage="+teachingLanguage+"&exameeType="+exameeType+"&agency=student";
   document.forms[0].submit();
}
function getMajor(){
var teachingLanguage =document.forms[0].teachingLanguage.value;
var exameeType =document.forms[0].exameeType.value;
var applyCollegeId =$("select[name='applyCollegeId']").val();
if(teachingLanguage==""){
return false;
}   
if(exameeType==""){
      return false;
}  
if(applyCollegeId==""){
       return false;
}  
spanid="major";
selectname="applyMajorId";
var url = "recruit_interStuApplyGetApplyMajor.do?teachingLanguage="+teachingLanguage+"&spanid="+spanid+"&selectname="+selectname+"&exameeType="+exameeType+"&applyCollegeId="+applyCollegeId;
    retrieveURL('<%=request.getContextPath()%>/foreignrecruit/' + url);
}
function doSubmit(type,fileName) {
if(type=="sub"){
var reg = /-00|0000/;
var perEnglishName=document.forms[0].perEnglishName.value;
   if(perEnglishName==""){
   $("#dialog-message-familyName").dialog( "open" );
         return false;
   }
var name=document.forms[0].name.value;
   if(name==""){
   $("#dialog-message-givenName").dialog( "open" );
         return false;
   }
var perBirthday=document.forms[0].perBirthday.value;
   if(perBirthday==""  || reg.test(perBirthday)){
   $("#dialog-message-birthDay").dialog( "open" );
         return false;
   }
var gender=document.forms[0].gender.value;
   if(gender==""){
   $("#dialog-message-gender").dialog( "open" );
         return false;
   }
var marriedIf=document.forms[0].marriedIf.value;
   if(marriedIf==""){
   $("#dialog-message-matrial").dialog( "open" );
         return false;
   }
var personUnit=document.forms[0].personUnit.value;
   if(personUnit==""){
   $("#dialog-message-religion").dialog( "open" );
         return false;
   }
var lastDegree=document.forms[0].lastDegree.value;
   if(lastDegree==""){
   $("#dialog-message-degree").dialog( "open" );
         return false;
   }
var birthCountry=document.forms[0].birthCountry.value;
   if(birthCountry==""){
   $("#dialog-message-birthCountry").dialog( "open" );
         return false;
   }
var birthCity=document.forms[0].birthCity.value;
   if(birthCity==""){
   $("#dialog-message-birthCity").dialog( "open" );
         return false;
   }
var nativeLanguage=document.forms[0].nativeLanguage.value;
   if(nativeLanguage==""){
   $("#dialog-message-nativeLan").dialog( "open" );
         return false;
   }
var validUntil=document.forms[0].validUntil.value;
   if(validUntil=="" || reg.test(validUntil)){
   $("#dialog-message-validuntil").dialog( "open" );
         return false;
   }
var issuePlace=document.forms[0].issuePlace.value;
   if(issuePlace==""){
   $("#dialog-message-issuePlace").dialog( "open" );
         return false;
   }
var permanentAdd=document.forms[0].famAddress.value;
   if(permanentAdd==""){
   $("#dialog-message-permanentAdd").dialog( "open" );
         return false;
   }
var permanentTel=document.forms[0].famTelephone.value;
   if(permanentTel==""){
   $("#dialog-message-permanentTel").dialog( "open" );
         return false;
   }
var presentAdd=document.forms[0].perAddress.value;
   if(presentAdd==""){
   $("#dialog-message-presentAdd").dialog( "open" );
         return false;
   }
var presentTel=document.forms[0].perTelephone.value;
   if(presentTel==""){
   $("#dialog-message-presentTel").dialog( "open" );
         return false;
   }
var emergName=document.forms[0].emergName.value;
   if(emergName==""){
   $("#dialog-message-emergName").dialog( "open" );
         return false;
   }
var emergRelation=document.forms[0].emergRelation.value;
   if(emergRelation==""){
   $("#dialog-message-emergRelation").dialog( "open" );
         return false;
   }
var emergAdd=document.forms[0].emergAddress.value;
   if(emergAdd==""){
   $("#dialog-message-emergAdd").dialog( "open" );
         return false;
   }
var emergTel=document.forms[0].emergTelephone.value;
   if(emergTel==""){
   $("#dialog-message-emergTel").dialog( "open" );
         return false;
   }
var emergEmail=document.forms[0].emergEmail.value;
   if(emergEmail==""){
   $("#dialog-message-emergEmail").dialog( "open" );
         return false;
   }
var mailingName=document.forms[0].mailingName.value;
   if(mailingName==""){
   $("#dialog-message-mailingName").dialog( "open" );
         return false;
   }
var mailingCountry=document.forms[0].mailingCountry.value;
   if(mailingCountry==""){
   $("#dialog-message-mailingCountry").dialog( "open" );
         return false;
   }
var mailingCity=document.forms[0].mailingCity.value;
   if(mailingCity==""){
   $("#dialog-message-mailingCity").dialog( "open" );
         return false;
   }
var mailingAdd=document.forms[0].mailingAddress.value;
   if(mailingAdd==""){
   $("#dialog-message-mailingAdd").dialog( "open" );
         return false;
   }
var mailingTel=document.forms[0].mailingTelephone.value;
   if(mailingTel==""){
   $("#dialog-message-mailingTel").dialog( "open" );
         return false;
   }
var mailingCode=document.forms[0].mailingPostalCode.value;
   if(mailingCode==""){
   $("#dialog-message-mailingCode").dialog( "open" );
         return false;
   }
   var startEndMon=document.getElementsByName("startEndMon");
for(var i=0;i<startEndMon.length;i++){
if(startEndMon[i].value==""){
   $("#dialog-message-edu").dialog( "open" );
   return false;
   };
}
var placeUnit = document.getElementsByName("placeUnit");
for(var i=0;i<placeUnit.length;i++){
if(placeUnit[i].value==""){
   $("#dialog-message-edu").dialog( "open" );
         return false;
};
}
var expDuty = document.getElementsByName("expDuty");
for(var i=0;i<expDuty.length;i++){
if(expDuty[i].value==""){
   $("#dialog-message-edu").dialog( "open" );
         return false;
};
}
var proverPlace = document.getElementsByName("proverPlace");
for(var i=0;i<proverPlace.length;i++){
if(proverPlace[i].value==""){
$("#dialog-message-edu").dialog( "open" );
return false;
};
}
var exameeType=document.forms[0].exameeType.value;
if(exameeType==""){
$("#dialog-message-applyFor").dialog( "open" );
return false;
}
var teachingLanguage=document.forms[0].teachingLanguage.value;
if(teachingLanguage==""){
$("#dialog-message-teachingLan").dialog( "open" );
return false;
}
var applyCollegeId=$("select[name='applyCollegeId']").val();
if(applyCollegeId==""){
$("#dialog-message-school").dialog( "open" );
return false;
}
var applyMajorId=$("select[name='applyMajorId']").val();
if(applyMajorId==""){
$("#dialog-message-major").dialog( "open" );
return false;
}
var desiredStudyDurationS=document.forms[0].desiredStudyDurationS.value;
   if(desiredStudyDurationS=="" || reg.test(desiredStudyDurationS)){
   $("#dialog-message-duration").dialog( "open" );
         return false;
   }
var desiredStudyDurationE=document.forms[0].desiredStudyDurationE.value;
if(desiredStudyDurationE=="" || reg.test(desiredStudyDurationE)){
$("#dialog-message-duration").dialog( "open" );
         return false;
   }
}
var exameeId=document.forms[0].userId.value;
   document.forms[0].action = "<%=request.getContextPath()%>/foreignrecruit/recruit_interStudentApplicationSubmit.do?type="
+ type + "&fileName=" + fileName + "&exameeId=" + exameeId;
if (type == "del")
$("#dialog-message-fileDelete").dialog("open");
else
document.forms[0].submit();
}
$(window).load(function() {
var msg = document.forms[0].msg.value;
if (msg != "") {
if (msg == "10") {
$("#dialog-message-fileLimit").dialog("open");
} else if (msg == "11") {
$("#dialog-message-fileFormat").dialog("open");
} else if (msg == "12") {
$("#dialog-message-fileSelect").dialog("open");
} else if (msg == "13") {
$("#dialog-message-fileExist").dialog("open");
} else if (msg == "14") {
$("#dialog-message-fileComplete").dialog("open");
} else if (msg == "19") {
$("#dialog-message-success").dialog("open");
} else {
ShowDiv('MyDiv', 'fade');
}
}
var obj = document.getElementById("exameeType");
for (var i=0;i<obj.length;i++){
if(obj.options[i].value=="4"){
obj.options[i].title="General Visiting Scholar Program: Applicants must have completed at least one year of undergraduate study at their home university. Normally General Visiting Scholar can only select undergraduate courses with the study duration of half-year to two years. Upon graduation, the student will receive a certificate of achievement.";
}
if(obj.options[i].value=="5"||obj.options[i].value=="6"){
obj.options[i].title="Senior Visiting Scholar Program: Applicants must have at least a Master's degree. Senior Visiting Scholars are normally supervised by a professor of the accepting school or college to conduct research in a specific subject. The program lasts from half-year to two years. Upon graduation, the student will receive a certificate of achievement. If the senior visiting scholar wants to audit courses, they must get approvement from the supervisor and school/college in advance.";
}
}
});
$(function() {
$("input.date").jSelectDate({
yearBeign : 1930,
yearEnd : 2030,
disabled : false
});
$(function(){
$("#dialog-message").dialog({
autoOpen : false,
modal : true,
buttons : {
'OK' : function() {
$(this).dialog("close");
}
}
});
});
$("#dialog-message-fileDelete").dialog({
autoOpen : false,
modal : true,
buttons : {
'OK' : function(){
$(this).dialog("close");
document.forms[0].submit();
},
'Cancel' : function(){
$(this).dialog("close");
}
}
});
$("#dialog-message-logout").dialog({
autoOpen : false,
modal : true,
buttons : {
'Logout' : function() {
$(this).dialog("close");
document.forms[0].submit();
top.location.href='<%=request.getContextPath()%>/recruitIndex.jsp';
},
'Cancel' : function() {
$(this).dialog("close");
}
}
});
$("a.addFamily")
.bind(
{
click : function() {
var innerContent = "<tr>";
innerContent += "<td height='24' bgcolor='e1e3e6' align='center'><input type='text' name='relFamilyName' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relGivenName' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relTitle' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relPhone' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relEmail' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relUnitDuty' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relUnit' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='relAddress' class='input11'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><table width='54' height='16' border='0' align='center' cellpadding='0' cellspacing='0'>";
innerContent += "<tr><td width='4'><img src='../images/images-recruit/anredl.png' ></td><td width='50' height='15' bgcolor='#930e14' class='txt3'><a class='del' href='javascript:void(0)' style='display: block;'>Delete</a></td><td width='4'><img src='../images/images-recruit/anredr.png'></td></tr></table></td>";
innerContent += "</tr>";
var obj = $(innerContent);
$("#table0").append(obj);
}
});
$("a.addStudy")
.bind(
{
click : function() {
var innerContent = "<tr>";
innerContent += "<td height='24' bgcolor='e1e3e6' align='center'><input type='text' name='placeUnit' class='input9-1'/></td>";
innerContent += "<td bgcolor='e1e3e6' colspan='2' align='center'><input type='text' name='startEndMon' style='width:170px;border: 0px;margin:4px 12px;'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='expDuty' class='input9-1'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='proverPlace' class='input6'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><table width='54' height='16' border='0' align='center' cellpadding='0' cellspacing='0'>";
innerContent += "<tr><td width='4'><img src='../images/images-recruit/anredl.png' ></td><td width='50' height='15' bgcolor='#930e14' class='txt3'><a class='del' href='javascript:void(0)' style='display: block;'>Delete</a></td><td width='4'><img src='../images/images-recruit/anredr.png'></td></tr></table></td>";
innerContent += "</tr>";
var obj = $(innerContent);
$("#table1").append(obj);
}
});
$("a.addWork")
.bind(
{
click : function() {
var innerContent = "<tr>";
innerContent += "<td height='24' bgcolor='e1e3e6' align='center'><input type='text' name='workPlaceUnit' class='input9-1'/></td>";
innerContent += "<td bgcolor='e1e3e6' colspan='2' align='center'><input type='text' name='workStartEndMon' style='width:170px;border: 0px;margin:4px 12px;'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='workExpDuty' class='input9-1'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='workProverPlace'size' class='input6'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><table width='54' height='16' border='0' align='center' cellpadding='0' cellspacing='0'>";
innerContent += "<tr><td width='4'><img src='../images/images-recruit/anredl.png' ></td><td width='50' height='15' bgcolor='#930e14' class='txt3'><a class='del' href='javascript:void(0)' style='display: block;'>Delete</a></td><td width='4'><img src='../images/images-recruit/anredr.png'></td></tr></table></td>";
innerContent += "</tr>";
var obj = $(innerContent);
$("#table2").append(obj);
}
});
$("a.addOther")
.bind(
{
click : function() {
var innerContent = "<tr>";
innerContent += "<td height='24' bgcolor='e1e3e6' align='center'><input type='text' name='otherPlaceUnit' class='input8'/></td>";
innerContent += "<td bgcolor='e1e3e6' colspan='2' align='center'><input type='text' name='otherStartEndMon' style='width:170px;border: 0px;margin:4px 12px;'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='otherExpDuty' class='input8'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='otherProverPlace' class='input8'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><input type='text' name='otherProver' class='input6'/></td>";
innerContent += "<td bgcolor='e1e3e6' align='center'><table width='54' height='16' border='0' align='center' cellpadding='0' cellspacing='0'>";
innerContent += "<tr><td width='4'><img src='../images/images-recruit/anredl.png' ></td><td width='50' height='15' bgcolor='#930e14' class='txt3'><a class='del' href='javascript:void(0)' style='display: block;'>Delete</a></td><td width='4'><img src='../images/images-recruit/anredr.png'></td></tr></table></td>";
innerContent += "</tr>";
var obj = $(innerContent);
$("#table3").append(obj);
}
});
$("a.del").live(
{
click : function() {
$(this).parent().parent().parent().parent().parent()
.parent().remove();
}
});
$(
"#dialog-message-issuePlace,#dialog-message-permanentAdd,#dialog-message-permanentTel,#dialog-message-presentAdd,#dialog-message-presentTel,#dialog-message-emergName,#dialog-message-emergRelation,#dialog-message-emergAdd,#dialog-message-emergTel,#dialog-message-emergEmail,#dialog-message-mailingName,#dialog-message-mailingCountry,#dialog-message-mailingCity,#dialog-message-mailingAdd,#dialog-message-mailingTel,#dialog-message-mailingCode,#dialog-message-family,#dialog-message-familyName,#dialog-message-givenName,#dialog-message-birthDay,#dialog-message-birthDayFormat,#dialog-message-gender,#dialog-message-matrial,#dialog-message-religion,#dialog-message-nationality,#dialog-message-nativeLan,#dialog-message-validuntil,#dialog-message-birthCountry,#dialog-message-birthCity,#dialog-message-degree,#dialog-message-edu,#dialog-message-applyFor,#dialog-message-school,#dialog-message-major,#dialog-message-teachingLan,#dialog-message-perInfo,#dialog-message-help,#dialog-message-submit,#dialog-message-fileLimit,#dialog-message-fileFormat,#dialog-message-fileSelect,#dialog-message-fileExist,#dialog-message-fileComplete,#dialog-message-success,#dialog-message-duration")
.dialog({
autoOpen : false,
modal : true,
buttons : {
OK : function() {
$(this).dialog("close");
}
}
});

});
</script>

dialog的代码:
<div id="dialog-message-fileDelete" title="System Message">
<p>Are you sure you want to delete this file?</p>
</div>
2015年1月03日 10:22
  • 大小: 92.3 KB
  • 大小: 11.7 KB
目前还没有答案

相关推荐

Global site tag (gtag.js) - Google Analytics