Click to See Complete Forum and Search --> : Let me re-word that...


ge0rg1e
11-28-2002, 09:13 AM
This is a re-post in an attempt to make my question clearer so that it gets answered. :-)

Here:

http://www.todaysmenu.ca/plan/tester.htm

when the user clicks the "Confirm & Print" button, a script writes the data from the form fields into another document.

On the Confirm & Print page, when the user hits the "Submit" button, the form field data *should* be sent via e-mail using FormMail.cgi, as specified on the previous page.

The problem is I can't seem to get the form field data to be passed through to the Submit stage. After the Confirm & Print page is written, the form field data is "forgotten".

I thought that a solution to this might be to have the Confirm & Print page pop up in a new window, thereby allowing the user to go back to the original form page after confirming and printing. The problem there is I can't seem to get the confirmPrint.js script to execute in a new window.

Any help with this would be greatly appreciated and credited in my code.

Confusedly,
Heidi

gil davis
11-28-2002, 09:38 AM
<a href="javascript:popUp('menu_mon_entree.htm')">

This link when selected will open the new window, and refresh your page (send you to the top of the page). Most browsers lose the "opener" relationship between the child and parent windows when this happens.

One solution is to code it this way:

<a href="menu_mon_entree.htm" target="_blank" onClick="popUp(this.href);return false">

This will open a new window even without JavaScript enabled (although Charles will make some objection about the use of target) and avoids the possible error mentioned.

I did not look at your "confirmPrint.js", but if this suggestion doesn't fix the problem, we would appreciate it if you could provide a trimmed down example to debug (cut down on the fancy stuff, minimize it to the problem requiring assistance, like only one menu choice and no images).

ge0rg1e
11-28-2002, 10:24 AM
Gil,

Thanks for your help and advice on posting. Here is a stripped down version of my issue:

www.todaysmenu.ca/plan/test.htm

The Confirm & Print button sends the form field data fine to the next page.

The Submit button, however, while it does execute the FormMail.cgi script, it doesn't include the form field data.

If the only solution is to have the Confirm & Print button open up a new window, how do I get the confirmPrint script to write the document into a new window?

Thanks,

Heidi

gil davis
11-28-2002, 12:52 PM
<a href="javascript:popUp('menu_fri_entree.htm')"><img src="images/button-change.gif" border="0"></a>

I asked you to change this and *then* ask for more help.

ge0rg1e
11-28-2002, 01:34 PM
Sorry, Gil,

I should have let you know that I did try your suggestion and I still couldn't get the thing to work.

The problem is not in passing the data from the pop-up back to the first window, but in passing the data from the first window through to the FormMail.cgi script.

Heidi

gil davis
11-28-2002, 05:19 PM
Your popUp is missing a </form> tag.