Plz help- JSP popup windows post input values are not fetched

Hi

I am working on a jsp page (sendmail.jsp) that submits the information relating to sending an email. The page is pop window that is opened when I click on a button. Now I want to post this data to another popup window which is itself a jsp page (mailsent.jsp) and have code to send the mail using mail API. But I m not able to fetch the input values which are submitted in the previous page because the new jsp page I have opened is a popup window. How can I post my parameters using popup window.(mailsent.jsp)?

Plz help

Thanks

divine

[569 byte] By [divinea] at [2007-11-27 11:38:07]
# 1

For this one instead of using a POST, use the GET method or better yet use the querystring in the popup call.... with javascript it can be something like:

window.open("mydestination.jsp?variable1="+document.form.input1.value+"&variable2="+document.form.input2.value,"mywin");

so in "mydestination.jsp" page you can recieve them as:

String data1 = request.getParameter("variable1");

String data2 = request.getParameter("variable2");

or assign it directly to a javascript variable with something like:

<script>

var data1=<%=request.getParameter("variable1")%>;

var data2 =<%=request.getParameter("variable2")%>;

rest of code.....

</script>

Hope this helps you :)

Regards!

Adrian

AdrianLabastidaa at 2007-7-29 17:18:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...