File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes javascript and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "javascript and JSP" Watch "javascript and JSP" New topic

javascript and JSP

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.
I agree. Here's the link:
subject: javascript and JSP
It's not a secret anymore!