Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

javascript and JSP  RSS feed

Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that access a bean method. In this JSP, I want to
access a bean method to get some value in a javascript function.
This javascript function will be called like this
<body onLoad="return showDrrValues">
In the Javascript function, I am using the following to get the value from bean
function showDrrValues() {
var p = <%= item.getProposedCredit() %>;
//once I get this value, I want to store it in a Frame form element
window.parent.lframe.credits.network_drr.value = p;
The browser window has two frames, top frame (tframe) and botom
frame (lframe). The value from function has to be stored in
the bottom frame. The javascript function is in the top frame (tframe). Now initially when in the top frame, when the HTMl page is loaded, the values in the bottom frames are stored. Now if leave the top frame html and then come back, the botom frames values are not loaded again. I have to press browser reload button to reload the values in the bottom frame. Can somebody tell me what I am doing wrong. I hope my question is clear.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!