About JSP page-to-page transfer values

Source: Internet
Author: User

Long time no use of this value, is generally a. Do request to the background in the jump to the front, like some just show the data function, this does not seem necessary, gossip not to say, recorded for the next reference.

With the HTML a tag, I use only these 2 usages here.

Scenarios such as:

1: Click Withdraw

The first way to set a parameter within a tag is the JSON object, the key value pair

<a href= "#" class= "a_a" onclick= "judge (this); return false; "
Params= "({
Agreeno: ' <c:out value= ' ${protocol.agreeno} '/> ',
Acctno: ' <c:out value= ' ${protocol.acctno} '/> ',
Cardno: ' <c:out value= ' ${protocol.cardno} '/> ',
Dspno: ' <c:out value= ' ${protocol.dspno} '/> ',
Drcracctno: ' <c:out value= ' ${protocol.drcracctno} '/> ',
Drcrcardno: ' <c:out value= ' ${protocol.drcrcardno} '/> ',
Busstype: ' <c:out value= ' ${protocol.busstype} '/> ',
Currencytype: ' <c:out value= ' ${protocol.currencytype} '/> ',
Maturitydate: ' <c:out value= ' ${protocol.maturitydate} '/> ',
Agreeamt: ' <fmt:formatnumber pattern= ' 0.00 ' value= ' ${protocol.amt '/> ',
Limitdays: ' <c:out value= ' ${protocol.limitdays} '/> ',
Depositrate: ' <fmt:formatnumber pattern= ' 0.00 ' value= ' ${protocol.depositrate '/> ',
Lendingrate: ' <fmt:formatnumber pattern= ' 0.00 ' value= ' ${protocol.lendingrate '/> ',
Discountlendingrate: ' <fmt:formatnumber pattern= ' 0.00 ' value= ' ${protocol.discountlendingrate '/> ',
Opendate: ' <c:out value= ' ${protocol.opendate} '/> ',
Monthterm: ' <c:out value= ' ${protocol.monthterm} '/> ',
Monthtermdesc: ' <c:out value= ' ${protocol.monthtermdesc} '/> '
}) "> Withdrawals </a>

1 methods included:

Function judge (obj) {
params = eval (obj.params);

var today = ' <c:out value= ' ${querydto.today} '/> ';
var opendate = params[' opendate '];

if (today>=opendate) {
Withdraw (obj);
return false;
} else {
var hrefz= "<c:url value= '/work/transfer/flexible_fixed_withdraw_tip.jsp '/>?opendate=" + openDate;
$.pa_ui.dialog.open ({
URL:HREFZ,
POSITION:[50,20],
Title: ' Withdrawal hint ',
Frameoverlay:true,
width:600,
HEIGHT:250,
Modal:true,
Minimize:false,
Maximize:false
});
return false;
}
}


2: Click Details

This is the way to invoke the value of the method in the event directly, and it is also the JSON pass value

<a href= "#" class= "a_a" onclick= "Detailqry ({
Acctno: ' <c:out value= ' ${protocol.cardno} '/> ',
Dspno: ' <c:out value= ' ${protocol.dspno} '/> ',
AMT: ' <fmt:formatnumber pattern= ' 0.00 ' value= ' ${protocol.amt} '/> ',
Monthterm: ' <c:out value= ' ${protocol.monthtermdesc} '/> ',
Effdate: ' <c:out value= ' ${protocol.effdate} '/> ',
Maturitydate: ' <c:out value= ' ${protocol.maturitydate} '/> ',
Opendate: ' <c:out value= ' ${protocol.opendate} '/> '
}); return false; "
> Details </a>

2 methods included:

function Detailqry (obj) {
var hrefz= "<c:url value= '/work/transfer/flexible_fixed_protocol_detail.jsp '/>?" +$.param (obj);
$.pa_ui.dialog.open ({
URL:HREFZ,
POSITION:[50,20],
Title: ' Flexible Deposit Protocol details ',
Frameoverlay:true,
WIDTH:650,
HEIGHT:500,
Modal:true,
Minimize:false,
Maximize:false
});
return false;
}

On another JSP page is the same, displaying the fields corresponding to the Param object points with the El tag

<c:out value= "${param.xxx}"/>

About JSP page-to-page transfer values

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.