Developer Support »

Show error messages and 'thank you' message in a new window with a 'close window' link  (See more user questions)

Hi .

Not using the autoredirect to take the customer back to your ebay page?

If not, I quite like the idea of the new window, keeping your sales page in
its own window.

I just tested it there. I'm not getting the "thank you" page in a new
window. I wouldn't worry too much about a link to close the window (just a
little JavaScript) as the customer can close the window in the normal
fashion or simply click into the window for your listing, which would still
be open.

You need to make the script messages (error messages and "thank you"
messages) appear in a new window. To do so, add target="_blank" to the form
action, so it would become:

<form action="formtoemailpro.php" method="post" target="_blank">

To add some JavaScript for a "close this window" link on the "thank you"
page, you could edit the default HTML code in the script for the "thank you"
message to include the JavaScript code needed to close the window, or you
could use the option in the script to use an HTML template for the "thank
you" message which amounts to the same thing.

This is the JavaScript code to make a "Close Window" link:

<a href="javascript:window.close();">Close Window</a>

Put the link in place of the continue link at the bottom of the script.
Change this:

<p><a href="<?php print $continue; ?>">Click here to continue</a></p>

...to this:

<p><a href="javascript:window.close();">Close Window</a></p>

Any questions, just let me know.

Best wishes.

Charles Sweeney
https://formtoemail.com
The world's easiest feedback script!

----- Original Message -----
Sent: Tuesday, November 30, 2010 1:40 PM
Subject: Re: FormToEmail-Pro script
> Charles,
>
> OK, here is a live eBay listing with the form included:
>
>
> I don't know if the results are ideal, but they are not horrible...
> perhaps I should just have a new window open with the "thank you" page,
> then users can close that window and continue with the eBay page they were
> already on.
>
> Thanks,
>