Hello everyone,

I have 2 JSP files, lets call it 1.jsp and 2.jsp. I have a javascript function in my 1.jsp file, that I am calling 2.jsp, and passing one argument. as follow:


function call1Servlet () {
    var myId = document.getElementById('lblId').textContent;
    window.open("/myapp/2.jsp?myId="+myId, "", "toolbar=no,menubar=no,resizable=no,scrollbars=yes,width=1024");

Now, in my 2.jsp on <body onload=myFunction()>, I need to read my argument [myId] that was passed from 1.jsp.
Can someone please point me to the direction on how to go about reading my argument? Thanks in advance.

I think that all you need to do is order you script tags.
like wise:

<script src='1.jsp'></script>
<script src='2.jsp'></script>

that way your function and argumants work on the second jsp file.