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, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to