gpt4 book ai didi

java - 单击java中子窗口的链接后,父窗口中未设置json数据

转载 作者:太空宇宙 更新时间:2023-11-04 13:35:10 25 4
gpt4 key购买 nike

我在java中使用struts1,数据库是oracle 10g。我想在单击子窗口中的链接时在ajax中在父窗口中设置值。这里,检索到json数据但未在字段中设置。有什么解决方案吗???请帮助我............

这是我的 JSP 代码--------------------------------

 function doClick(v1,v2){

var f = document.importLetterOfCreditBookingForm;
var v3=window.opener.document.importLetterOfCreditBookingForm.LCLimitTypeCode.value;
var v4=window.opener.document.importLetterOfCreditBookingForm.LCAccountTypeCode.value;
var v5=window.opener.document.importLetterOfCreditBookingForm.LCBookingNumber.value;
window.opener.document.importLetterOfCreditBookingForm.customerCode.value = v1;
window.opener.document.importLetterOfCreditBookingForm.customerName.value = v2;

/*f.action="/mybank/enterLCDetailsListOfImportLetterOfCreditBooking.do";
f.submit();*/
$(document).on('click', function (){
$.ajax({
type:'get',
url:'/mybank/enterLCDetailsListOfImportLetterOfCreditBookingJson.do?LCLimitTypeCode='+v3+'&LCAccountTypeCode='+v4+'&LCBookingNumber='+v5+'&customerCode='+v1,
dataType:'json',
success: function(data){

f.LCLimitTypeCode.value = data.LCLimit;
f.LCAccountTypeCode.value = data.LCAccountType;
f.LCBookingNumber.value = data.LCBookingNo;
f.customerCode.value = data.CustCode;
f.customerName.value = data.CustName;
f.customerAddess.value = data.CustAddress;

f.bangladeshBankLCNumber.value = data.BBBankLcNo;
f.partyDebitAccountTypeCode.value = data.PartyDebAccountCode;
f.partyDebitAccountNumber.value = data.PartyDebAccountNo;
f.partyDebitAccountTitle.value = data.PartyDebAccountTitle;
f.IRCNumber.value = data.IRCNo;
f.vatRegistrationNumber.value = data.VatRegiNo;
f.TINNumber.value = data.TinNo;
f.bankRegistrationNumber.value = data.BankRegiNo;
f.LCFinanceCode.value = data.LCFinanceCode;
f.sactionId.value = data.SanctionId;
f.sanctionSerialNumber.value = data.SanctionSrlNo;
f.sanctionAmount.value = data.SanctionAmount;
f.LCBookingAmount.value = data.LCBookingAmount;
f.LTROutstanding.value = data.LTROutstanding;
f.PADOutstanding.value = data.PADOutstanding;
f.availableGlobalLimit.value = data.AvailableGlobalLimit;
f.sanctionAuthotiryCode.value = data.SanctionAuthotiryCode;
f.sanctionNumber.value = data.SanctionNumber;
//f.sanctionDate.value = data.SanctionDate;
//f.sanctionDay.value = data.SanctionDay;
f.LCAFNumber.value = data.LCAFNumber;
//f.LCAFDate.value = data.LCAFDate;
//f.LCAFDay.value = data.LCAFDay;
f.LCAFAmountLC.value = data.LCAFAmountLC;
//f.bookingDate.value = data.BookingDate;
//f.bookingDay.value = data.BookingDay;
f.foreignLCCode.value = data.ForeignLCCode;
f.negotiationCode.value = data.NegotiationCode;
f.formOfLCCode.value = data.FormOfLCCode;
f.recourseAllowedCode.value = data.RecourseAllowedCode;
f.categotyCode.value = data.CategotyCode;
f.typeOfLCCode.value = data.TypeOfLCCode;
f.sightPercentage.value = data.SightPercentage;
f.communicationMediaCode.value = data.CommunicationMediaCode;
f.drawee.value = data.Drawee;
f.rateCode.value = data.RateCode;
f.tradeTermCode.value = data.TradeTermCode;
f.countryOfOriginCode.value = data.CountryOfOriginCode;
f.countryOfOriginCodeDesc.value = data.CountryOfOriginCodeDesc;
f.beneficiaryId.value = data.BeneficiaryId;
f.beneficiaryName.value = data.BeneficiaryName;
f.beneficiaryAddress.value = data.BeneficiaryAddress;
f.modeOfTransportCode.value = data.ModeOfTransportCode;
f.availableByCode.value = data.AvailableByCode;
f.availableWithCode.value = data.AvailableWithCode;
f.ammendmentNumber.value = data.AmmendmentNumber;
//f.ammendmentDate.value = data.AmmendmentDate;
//f.dateOfIssue.value = data.DateOfIssue;
//f.LCIssueDay.value = data.LCIssueDay;
f.LCExpiryDate.value = data.LCExpiryDate;
//f.LCExpiryDay.value = data.LCExpiryDay;
f.placeOfExpiry.value = data.PlaceOfExpiry;
//f.shipmentDate.value = data.ShipmentDate;
f.shipmentPeriod.value = data.ShipmentPeriod;
f.currencyCode.value = data.CurrencyCode;
f.exchangeRate.value = data.ExchangeRate;
f.tolerancePercentagePositive.value = data.TolerancePercentagePositive;
f.tolerancePercentageNegative.value = data.TolerancePercentageNegative;
f.LCOpenValueFCY.value = data.LCOpenValueFCY;
f.LCOpenValueLCY.value = data.LCOpenValueLCY;
f.LCCurrentValueFCY.value = data.LCCurrentValueFCY;
f.LCCurrentValueLCY.value = data.LCCurrentValueLCY;
f.LCValueFCY.value = data.LCValueFCY;
f.LCValueLCY.value = data.LCValueLCY;
f.statusOfCreditCode.value = data.StatusOfCreditCode;
f.usanceInDays.value = data.UsanceInDays;
f.fromPort.value = data.FromPort;
f.transportTo.value = data.TransportTo;
f.shipmentPeriod.value = data.ShipmentPeriod;
f.partshipmentAllowedCode.value = data.PartshipmentAllowedCode;
f.transhipmentAllowedCode.value = data.TranshipmentAllowedCode;
f.confirmInstructionCode.value = data.ConfirmInstructionCode;
f.transferableCode.value = data.TransferableCode;
f.LCStatus.value = data.LCStatus;
f.advisingBankCode.value = data.AdvisingBankCode;
f.advisingBranchCode.value = data.AdvisingBranchCode;
f.advisingBankCodeDesc.value = data.AdvisingBankCodeDesc;
f.adviseThroughBankCode.value = data.AdviseThroughBankCode;
f.adviseThroughBranchCodeDesc.value = data.AdviseThroughBranchCode;
f.adviseThroughBankCodeDesc.value = data.AdviseThroughBankCodeDesc;
f.negotiatingBankCode.value = data.NegotiatingBankCode;
f.negotiatingBranchCode.value = data.NegotiatingBranchCode;
f.negotiatingBankCodeDesc.value = data.NegotiatingBankCodeDesc;
f.transferingBankCode.value = data.TransferingBankCode;
f.transferingBranchCode.value = data.TransferingBranchCode;
f.transferingBankCodeDesc.value = data.TransferingBankCodeDesc;
f.reimbursingBankCode.value = data.ReimbursingBankCode;
f.reimbursingBranchCode.value = data.ReimbursingBranchCode;
f.reimbursingBankCodeDesc.value = data.ReimbursingBankCodeDesc;
f.confirmingBankCode.value = data.ConfirmingBankCode;
f.confirmingBranchCode.value = data.ConfirmingBranchCode;
f.confirmingBankCodeDesc.value = data.ConfirmingBankCodeDesc;
f.applicantBankCode.value = data.ApplicantBankCode;
f.applicantBranchCode.value = data.ApplicantBranchCode;
f.applicantBankCodeDesc.value = data.ApplicantBankCodeDesc;
f.insuranceBankCode.value = data.InsuranceBankCode;
f.insuranceBranchCode.value = data.InsuranceBranchCode;
f.insuranceBankCodeDesc.value = data.InsuranceBankCodeDesc;
f.insuranceCoverNoteNumber.value = data.InsuranceCoverNoteNumber;
//f.insuranceCoverNoteIssueDate.value = data.InsuranceCoverNoteIssueDate;
//f.insuranceCoverNoteDay.value = data.InsuranceCoverNoteDay;
f.indentPerformFlagCode.value = data.IndentPerformFlagCode;
f.indentPerformInvoiceNumber.value = data.IndentPerformInvoiceNumber;
//f.indentPerformInvoiceDate.value = data.IndentPerformInvoiceDate;
f.indentPerformInvoiceValue.value = data.IndentPerformInvoiceValue;
f.indentorNameAndAddress.value = data.IndentorNameAndAddress;
f.CCIAndERegistrationNumber.value = data.CCIAndERegistrationNumber;
f.bangladeshBankPerformanceNumber.value = data.BangladeshBankPerformanceNumber;
f.CRFCompany.value = data.CRFCompany;
f.sequenceTotal.value = data.SequenceTotal;
f.periodPresent.value = data.PeriodPresent;
f.charges.value = data.Charges;
f.statusOfTrnsDocumentCode.value = data.StatusOfTrnsDocumentCode;
f.overseasBankChargePaidByCode.value = data.OverseasBankChargePaidByCode;
f.instruction.value = data.Instruction;
f.sendToReciver.value = data.SendToReciver;
f.documentRequired.value = data.DocumentRequired;
f.conditions.value = data.Conditions;
f.additionalConditions.value = data.AdditionalConditions;
f.availableGlobalLimit.value = data.Available;
f.goodsDetails.value = data.GoodsDetails;
f.HSCode.value = data.HSCode;

}
});
});

window.close();
}
 <td valign="top" class="lbl-08" align="center"><a href="#" onClick="doClick('<%=sCustomerID%>','<%=sCustomerName%>')"><font class="link-b-08"><%=sSelect%></font></a></td>

最佳答案

如果您在父窗口中定义了一个全局变量,例如

var var1 = "value1" 

然后您可以使用

在子窗口中简单地访问/更改它
parent.var1 = "value2"

如果你想从子窗口更改父窗口的表单元素,你可以这样设置

 window.opener.document.getElementById('textbox1').value="put your value here";

查看类似主题 herehere .

关于java - 单击java中子窗口的链接后,父窗口中未设置json数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31779890/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com