learn java
The moose likes Servlets and the fly likes Javascript and JSP (urgent) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Javascript and JSP (urgent)" Watch "Javascript and JSP (urgent)" New topic

Javascript and JSP (urgent)

rajesh rao

Joined: May 17, 2001
Posts: 4
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.
Mark Simms
Ranch Hand

Joined: Jul 20, 2000
Posts: 36
All you need to do is reload the bottom frame yourself when the top frame loses focus.

Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: Javascript and JSP (urgent)