Solved

On submit open a new window and pass form variables?

Posted on 2004-04-22
8
418 Views
Last Modified: 2013-12-24
Hi,

I have a form in my page, and I need to open a new window when a submit button clicked.
The form variables need to be passed too.

Anyone have a JavaScript that can do this?

Thanks
0
Comment
Question by:g118481
8 Comments
 
LVL 18

Expert Comment

by:Plucka
ID: 10887891
Hi g118481,

You don't need javascript, unless you want to do something special with the window.

All you need is to specify the target on the form and it will pop into a new window.

<form target="_blank" name="test">

Le me know if you need further assistance.

Regards
Plucka
0
 
LVL 25

Expert Comment

by:James Rodgers
ID: 10887931
Plucka is right you don't need javascript to do this

you will nedd javascript if you want to change the form page on a successful submission
parent.location.href="path/to/newpage.cfm";

or if the new window is to be closed after a successful submission
place at bottom of page!! or set a timer to execute as a function

window.close(); //only works on child windows
0
 
LVL 17

Accepted Solution

by:
anandkp earned 150 total points
ID: 10891851
use javascript to open a new window ... give window a name there
<A HREF="##" onClick="window.open('popup.htm?Img=anand.jpg','popup','scrollbars=yes,resizable=yes,width=500,height=350,left=0,top=0');document.frm.submit();return false">

like the name here is "popup"

& have ur form like this ...
<form name="frm" action="popup" method="post">
;
;
;
;
</form>
0
 
LVL 1

Author Comment

by:g118481
ID: 10892061
Anandkp,

I like your suggestion.
Can you explain further?

Cheers
0
 
LVL 1

Author Comment

by:g118481
ID: 10892092
Anandkp,

How do I incorporate the link part of your suggestion to the submit button of my form on the main page?
I just don't understand what configuration you are suggesting.  Please explain further.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question