pop ups

andyn20's picture

They have: 52 posts

Joined: Jun 2001

After clicking a form submission button I want the new page to pop up. With a normal link an it works just fine but I just do not know how to do it with a form submission.

Since the form links to another server I have no control over the page I'm linking to. Otherwise, I'd just put in an onload function.

cycleboy.com/jpizza/ftb.html

Any help would be appreciated.

Thanks
Andrew

detox's picture

They have: 571 posts

Joined: Feb 2001

do you want to close the main window after form submission? and just continue with the pop up?

You can simply add the onClick event to the submit button is you dont need any info passed along:

<?php
onclick
=\"window.open('somepage.htm','windowName','height=480,width=640');\"
?>

andyn20's picture

They have: 52 posts

Joined: Jun 2001

Thanks, the onclick function worked nicely but I do need to pass along some data.

I'd like to have poll results "popup" over the main page and, unfortunately, I do need to pass along the users data. To make matters worse I have no control over the page I'm sending the results to. It's an off the rack poll service.

Maybe what I need is a good cgi script and to do it myself.

ButI'm still curious if I can make a form submission "pop up" and send data without having control over the destination page. (Did that make any sense?)

Thanks again

Andrew

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi andy,

Is this what you are asking?

page1 submits data to page2 then goes to page3 to display and/or pick up more data?

If so, probably not.

You can transfer data from one page to another with:

window.open("somepage.ext?someVar=someValue",.....)

but, if 'somepage.ext' has no idea how to process 'someVar', the data would either throw an exception and crash, or just be ignored and discarded.

So...yes, writing your own cgi would be the way to go.

Vinny

Where the world once stood
the blades of grass cut me still

andyn20's picture

They have: 52 posts

Joined: Jun 2001

Hey thanks for interpreting my question. (Too many beers not enough cells) That's what I was trying to say.

I think I'll go the cgi route in that case. Now I just need a good script.

Thanks Andrew

andyn20's picture

They have: 52 posts

Joined: Jun 2001

I found some javascript that allows me to pass data through a form submission with a pop up.

<script LANGUAGE="JavaScript">
function Start(page)
{OpenWin = this.open(page,"popup");}</script>

It seems to work, so far......

Thanks again
Andrew

They have: 2 posts

Joined: Sep 2001

I have a decent poll script that I got from scriptsearch.com and I have it do what you are looking for.....
If you want it email me and I'll forward it to you....

They have: 133 posts

Joined: Sep 2000

Why not do it the easy way?

...

that should open it in a new window Smiling Aint that what you were looking for?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.