Click to See Complete Forum and Search --> : How Do I ...
bandido
03-05-2007, 11:27 PM
how do i transfer a value from one form to a popup window ?
see attached zip file for source codes ...
i was given this task to display a calendar and when a date is selected (cal.jsp) , that date would be displayed in a popup window (testonly.jsp) ...
thanks ...
mattv10
03-07-2007, 07:00 PM
I have never made a .jsp page before, but I'm assuming anything Java related applies.. If you make a getvalue() method and return that value you can store that value anywhere by calling getvalue()..
I am familiar with .asp pages and you normally just make a variable assign it to the value you want and then use a javascript popup window or a JOptionPane in your case to display the value..
I think this is what your looking for... Hope it helps
hermoine
03-08-2007, 06:48 AM
hello,
U wanted to display the date in the pop window right? If you still have not solved the problem i will tell you a way. i tried it its working.
you have given a link for the popup window in cal.jsp right.. you edit it as follows.
<a href="#"onClick="form1.datevalue.value='<%=(currMonth+1) + "/" +dispDay + "/" + currYear%>';window.open('testonly.jsp?value=<%=(currMonth+1) + "/" + dispDay + "/" + currYear%>','popuppage','datevalue','width=250,height=200,top=100,left=100, status=no, scrollbars=yes');">
you paste this code insted of you original code(only this line is modified). You then go to testonly.jsp
and in the textbox value attribute give
"<%=request.getParameter("value")%>"
you will get the answer. try it. if not coming tell me i explain again.
:cool: