JS Question

I have an HTML form. When the form is filled in and the user presses the
submit button, a CGI script processes the submitted data. Everything is
OK up to here.
This is where I need help: After the form submission, I need to pop-up a
small window and print the success/failure page on that small pop-up
window. Does anyone have a JS code to do this?

Thanks in advance for any/all help.


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

Generally, your CGI script will return to the browser a success / failure
page.

Re: JS Question

Ned Wolfenbarger wrote:
>
> Generally, your CGI script will return to the browser a success / failure
> page.

Thanks, but I already know that. What I need to figure out is how to
make the success/failure page appear in a pop-up window.


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

On Tuesday 02 July 2002 07:18 pm, Peter N. Go wrote:

>> Generally, your CGI script will return to the browser a success / failure
>> page.
>
>
> Thanks, but I already know that. What I need to figure out is how to
> make the success/failure page appear in a pop-up window

How about just adding something like this for the scripts results page?

if (success) {
echo “normal javascript popup code with script.cgi?success=yes”;
} elseif (failure) {
echo “normal javascript popup code with script.cgi?success=no”;
}

John R. Marshall - Web Developer

JRM Studios - http://www.jrmstudios.com
The Hotrodding Network - http://www.hotrodding.net

Re: JS Question

“John R. Marshall” wrote:
>
> How about just adding something like this for the scripts results page?
>
> if (success) {
> echo “normal javascript popup code with script.cgi?success=yes”;
> } elseif (failure) {
> echo “normal javascript popup code with script.cgi?success=no”;
> }

Never thought about that but it looks like it can work.
Will give it a try. Thanks.


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

“Peter N. Go” wrote:
>
> Ned Wolfenbarger wrote:
> >
> > Generally, your CGI script will return to the browser a success / failure
> > page.
>
> Thanks, but I already know that. What I need to figure out is how to
> make the success/failure page appear in a pop-up window.

<FORM target=“INSERT_POPUP_WINDOW_NAME_HERE” action=“etc”>

-Mike K.

Re: JS Question

Mike King wrote:
>
> <FORM target=“INSERT_POPUP_WINDOW_NAME_HERE” action=“etc”>

Mike,

This will only work IF the pop-up window is already popped open.
Otherwise, it opens a whole new browser window.


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

“Peter N. Go” wrote:
>
> Mike King wrote:
> >
> > <FORM target=“INSERT_POPUP_WINDOW_NAME_HERE” action=“etc”>
>
> Mike,
>
> This will only work IF the pop-up window is already popped open.
> Otherwise, it opens a whole new browser window.

Correct, it will open a named window.

You could also use something like:

<form onClick=“javascript:window.open(etc, etc)”>

or is it onSubmit?

Can you tell I haven’t written any code in 2 months? :-/

-Mike K.

Re: JS Question

Mike King wrote:
>
> You could also use something like:
> <form onClick=“javascript:window.open(etc, etc)”>
> or is it onSubmit?
> Can you tell I haven’t written any code in 2 months? :-/

OK, I’ll try these as well.
Can you tell, inspite of being a bounty-programmer, I really know
nothing about JS?


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

“Peter N. Go” wrote:
>
> OK, I’ll try these as well.
> Can you tell, inspite of being a bounty-programmer, I really know
> nothing about JS?

I’ve only used JS when absolutely necessary, and never bothered to
“learn” it properly. I know how to accomplish a bit with it, but it
doesn’t come naturally to me like perl, PHP, C++, java do.

-Mike K.

Re: JS Question

Mike King wrote:
>
> I’ve only used JS when absolutely necessary, and never bothered to
> “learn” it properly. I know how to accomplish a bit with it, but it
> doesn’t come naturally to me like perl, PHP, C++, java do.

Likewise. I only use it if I am being forced to use it :slight_smile:


Peter N. Go - mailto:peter@icthus.net

http://CGI-City.net http://ArticleCity.com
http://ZenSearch.com http://BannerBuild.com
http://RegisterGuy.com http://BudgetWebHost.com
http://NewsCuts.com http://FreeMailWeb.com

2,500 Qualified Visitors to your website for only $25.
http://www.icthus.net/pay-per-click/

Accept Credit Cards Online. Run An Affiliate Program.
http://www.icthus.net/cgi-city/clickbank.html

Re: JS Question

On Tuesday 02 July 2002 11:36 pm, Peter N. Go wrote:

> OK, I’ll try these as well.
> Can you tell, inspite of being a bounty-programmer, I really know
> nothing about JS?

It’s because Javascript is the root of all evil! :wink:

The only usefull thing in js I can think of are alert boxes asking are you
sure you want to delete this.


John R. Marshall - Web Developer

JRM Studios - http://www.jrmstudios.com
The Hotrodding Network - http://www.hotrodding.net