Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

On submit open a new window and pass form variables?

Posted on 2004-04-22
8
Medium Priority
?
424 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 600 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

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 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