Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need to access/modify JavaScript variable inside scriptlet in a JSP

843840Aug 10 2008 — edited Jun 24 2009
Hello There,

What I am trying to achieve is this: after my user clicks at a button, open new window, next time opens the same button, refresh the window with whatever the new values are in session.

More details:
In an abstract description, this is what I am trying to achieve:


if((Boolean)session.getAttribute(windowOpen).equals(Boolean.FALSE))
{%>

<%log.info("targetUrl FIRST MEMBER WINDOW " + targetUrl);//REMOVE CHANGE%>

var memberWindow = null;
memberWindow = (var)<%session.getAttribute(windowName);%>
memberWindow.location.replace("<%=targetUrl%>");
<%session.setAttribute("windowOpen", true);%>

<%}
else if((Boolean)session.getAttribute(windowOpen).equals(Boolean.TRUE))
{%>

var memberWindow = null;
memberWindow = (var)<%session.getAttribute(windowName);%>
memberWindow.location.reload();

<%}%>

could have one more else if here--


Referring to the above code, no matter how correct I try to get my syntax and all, it just doen't work. Instead killing a forest I thought of stopping by for some insights before I start another endeavour.

Any help, pointers will be highly appreciated.


Thank You!

Nirmal
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2009
Added on Aug 10 2008
4 comments
183 views