473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

submit form data to a new window failed using HTTP POST

The following program submit a FORM DATA to a new window using HTTP POST,
and postprocess.asp couldn't get the form data. If I do in GET method and
pass by
query string in windowURL, then it works. But I need HTTP POST method, are
there
any workarounds?

<html>
<script type="text/javascript">
function checkAndSubmitForm(theForm)
{
var windowURL = theForm.action;
window.open(windowURL, "newWin",
"scrollbars=0,menubar=0,toolbar=0,location=0,statu s=0");
}
</script>

<body>
<FORM NAME="formname" method="POST" action="postprocess.asp">
<P><input type=text" name="username"/>
<P><input type="button" name="submitBtn" value="Submit Form"
onClick="checkAndSubmitForm(document.formname)">
</FORM>
</body>
</html>

postprocess.asp is just one line statement to get the form data
<%= Request.Form() %>
any ideas? please help!! thanks!!
Jul 19 '05 #1
1 6578
Matt wrote:
The following program submit a FORM DATA to a new window using HTTP
POST, and postprocess.asp couldn't get the form data. If I do in GET
method and pass by
query string in windowURL, then it works. But I need HTTP POST
method, are there
any workarounds?


No. Post the data from page A to page B in the same window. Page B processes
the data and uses client-side code in the onload event to open a third page
(C) in a new window, closing the original window if you don't want to have
two windows open.

Some popup stoppers will need to be configured to not interfere in this
process

An alternative would be to use XMLHTTP to post the data to page B,. and when
you get the result, open the new window.

You are not getting a lot of response to this question because:
1. You asked it during the weekend
2. It is off-topic. Only client-side code can be used to open a new window,
and ASP is server-side technology

Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open...
2
by: Terence Parker | last post by:
How does one go about submitting a form with a link - but submitting it to a new window AND to a page different to that described within the action="" option of the <form> tag? Say, for example,...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
1
by: Andy Kasotia | last post by:
I have an ASP UI with VB Dll as a COM object that access the DB2 Database. I have a "Calculate" button on the ASP Page which when clicked does form validation (javascript) and submits the form...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
4
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page...
1
by: gzannd | last post by:
I have a problem with submitting a form to a PHP page through a dynamically created IFRAME in IE7. This code works fine in Firefox. However, IE7 submits an empty form--the correct PHP page is...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
4
by: vunet | last post by:
Hello, My HTML form submits some values to a hidden iframe. However, this is done for file upload fields only. After file uploading is finished I am using this form to submit all other data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.