Hi,
I don't know which list to follow for this problem, so I am cross
posting.
I have a JSP that looks something like this (I cannot post complete JSP
because my office does not allow so!):
<snip>
... start html tags ...
<%
String open = request.getParameter("opennodes");
if(open == null)
open = "";
else
// Do some processing with open (creat a tree with these nodes open
etc)
%>
<script language="javascript" type="text/javascript">
function openNode(which)
{
allopen = document.formx.opennodes.value;
allopen = allopen + which + ";";
document.formx.opennodes.value = allopen;
document.formx.submit();
}
</script>
<form method="post" action="this.jsp" name="formx">
<input type="hidden" name="opennodes" value="<%=open%>"/>
</form>
// Create tree with links something like this:
<a href="javascript:opennodes('011')">Open Node 011</a><br>
<a href="javascript:opennodes('101')">Open Node 101</a><br>
... end html tags ...
</snip>
Now, here's a strange problem:
* When I click any of the links, I get the page properly rendered and
updated. With the nodes opened / closed as desired.
* When I click any of the links and then before the page is fetched,
click on any other link, what I get is nothing. Either I get only one / two
nodes (never complete lists - which generally contains at least 8-10 parent
nodes) or at times not even those.
What's causing the problem? Firstly I thought the problem is due to this
javascript thing, but then javascript never removes any node from the link,
so it cannot be a problem. It has something to with jsp/servlet request /
response thing.
TIA
Happy hacking,
Gaurav Vaish
http://mastergaurav.virtualave.net/iitk
----------------------------
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com