-
submit form & open page with 1 button
Hello,
I would like to submit the contents of a form by clicking
on a "submit" button and then have another page open.
The idea is that I want to gather information about the
people who are opening a particular page by forcing
them to first fill out a form. I tried using the standard
html "submit' function and then java script to open the page,
and the page would open, but the form info would not be sent.
I assume I need to do both the submit and page open in Java
script but don't know how. Can you please help?
Thanks in advance,
Gregg
-
Re: submit form & open page with 1 button
"Gregg" <extension@wec.ufl.edu> wrote:
>
>Hello,
>I would like to submit the contents of a form by clicking
>on a "submit" button and then have another page open.
>The idea is that I want to gather information about the
>people who are opening a particular page by forcing
>them to first fill out a form. I tried using the standard
>html "submit' function and then java script to open the page,
>and the page would open, but the form info would not be sent.
>I assume I need to do both the submit and page open in Java
>script but don't know how. Can you please help?
>
>Thanks in advance,
>Gregg
Hi Gregg!
You must define your button not as a Submit button. You have to define in
html following:
<input type="BUTTON" value="Submit it!" onClick="performProcess();">
And in your Javascript part you will need following lines:
<SCRIPT LANGUAGE="JavaScript">
var OpenWindow;
var windowprops = "toolbar=0,location=0,directories=0,status=0, " + "menubar=0,scrollbars=0,resizable=0,width=800,height=600";
function performProcess() {
OpenWindow = window.open("nameOfyourPage.html", "nameOfPage", windowprops);
document.yourFormName.submit();
}
</SCRIPT>
that should works. If I have understood your intention.
Bye.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks