Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Taking Input From Pop-Up, redirect to original Page + show results

Status
Not open for further replies.

StevenFitz

Programmer
Joined
Jun 28, 2006
Messages
1
Location
IE
Hey guys.

Basically what I would wish to do is as follows.

I have Page called options.jsp with a list of options which require user details. When the user clicks on one of the options a pop-up appears on the screen asking the user to a date for example. Then when the user enters the date in the form and clicks submit, I would like to store the date in the session and have it displayed on the origianal options.jsp page.

Question 1. At the moment when I click submit on the pop-up page instead of going to Options.jsp the original page. The pop-up page itself changes to Options.jsp giving me two option.jsp pages open. Namely the original which is unchanged ( Which I dont want), and the pop-up page displaying options.jsp now to.

Question 2. Regarding the data, would it be better to send the data collected from form to options.jsp or handle it straight in the pop-up and save it in the session.

This is how I open the pop-up once the user clicks the option on option.jsp

**option.jsp (Home Page which should display options + results)
onclick="openpopupSmall('newEntrant.jsp')

and this is how form is handle on the pop-up

** pop-up page newEntrant.jsp

<form name=startDate action="advancedOptions.jsp" method="post">

<input type ='submit' name = 'action' value = 'Submit'>

<input type="button" onClick="javascript:self.close();" value ='Cancel'>
</form>



Now it is clear to me that what I'm doing is wrong, but I dont know how to do this so I hope someone here can point me in the right direction. I think I should be using <target> frames ?
 
From that I read you want to use this faq. It will show you how to open a popup and have the pages communicate so that the child page can send data the the parent.

I don't know the answer but my good friend Google does.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top