PDA

View Full Version : PoP Up !


_PANKAJ_
11-29-2005, 01:43 PM
print "Location: http://mysite.com\n\n";

this above is used to rdirect it to that page...

how to POP up a new window ... with redirection :confused: ( i want both thing ... redirect to a site ... n add a pop up.. to open a new window to it take it to another site ) :rolleyes:


can any1 tell me :confused:

Best Regards

Pankaj :thumbsup:

nkrgupta
11-29-2005, 01:54 PM
You'll have to use JavaScript to have a popup. When do you want the PopUp to pop up ? For example - onClick of any element, or clicking a link etc. ? And when do you want to redirect?

Naveen

_PANKAJ_
11-29-2005, 02:02 PM
i mean ... once the user .. filled my form.. the cgi script will run... ... it shud direct it to ...thank u link... n at that same time n pop up shud open ... n direct to a link of my choice ... :confused:

Best Regards

Pankaj

nkrgupta
11-29-2005, 02:18 PM
Ok... Its pretty simple. I assume that you are aware of the working principles of a <FORM>. In the action attribute of the <form> tag, you specify the path to the script which processes the form. You can print the Thank You part in that script itself or redirect to any other page you wish, using the Print "Location.." header.
As for the popup, you have to include an "onClick" event in the submit button which will call a Javascript function to open a popup. You can specify the url and properties in the function itself.

Its time for me to go home and so if you need assistance with the coding part, other experts might help you for the day.

In the meantime you may want to go through http://www.w3.org/TR/REC-html40/interact/forms.html.

Naveen

_PANKAJ_
11-29-2005, 02:26 PM
ok u got it wat i m sayin.....

but the thing is ... i want it in my cgi script... not that onclick.....

well thx for ur help .. :)


can ne1 help me :confused:


Best Regards

Pankaj :thumbsup:

_PANKAJ_
11-30-2005, 05:53 AM
:o ...... no1 can help me ? :rolleyes: ... except naveen !

hez the only 1 whoz helpin me .....:thumbsup:

nkrgupta
11-30-2005, 06:40 AM
Hi Pankaj,
If i understand what you require, then probably there is no way to do it ( at least i don't know of one). Having a popup is a client side affair -- http://en.wikipedia.org/wiki/Client-side_scripting -- which is triggered only when the user (a client) does something on the page he is dealing with -- such as clicking a link, submitting a form etc. And CGI is totally a server side thing -- http://www.w3.org/CGI/ . What you can do though, is open a page(which you want as popup) in a new window (target="_blank") at the same time when you are redirecting the users to the thank you page. But this is an HTML thing and has nothing to do with CGI or PopUp as you said.

Naveen

_PANKAJ_
12-01-2005, 10:51 AM
ok thx naveen.. for helpin me.... :thumbsup: