Need to access/modify JavaScript variable inside scriptlet in a JSP
843840Aug 10 2008 — edited Jun 24 2009Hello 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