Solved

How to submit a form to an ASP file in a new window?

Posted on 2000-03-30
5
150 Views
Last Modified: 2010-04-09
<form action="Test.asp" method="post">
<input type="Text" value="" >
<input type="submit" value="Test" >
</form>
I want to post the form to Test.asp in a new window but not in the same window. What should i do?
0
Comment
Question by:benzwong
[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
5 Comments
 
LVL 1

Expert Comment

by:choroque
ID: 2671534
try this:

<form name="f1" method="post">
<input type="Text" value="">
<input type="button" value="Test" onclick="submit1()">
</form>

<script language="javascript">
function submit1(){
document.f1.action="test.asp";
document.f1.target ="_parent"
document.f1.submit();
}
</script>
0
 

Expert Comment

by:chteril
ID: 2672182
or simply:
<form name="f1" method="post" action='test.asp' target='nameofyournewwindow'>
<input type="Text" value="">
<input type="submit" value="Test" > 
</form>


0
 
LVL 1

Expert Comment

by:Whitewolf
ID: 2679396
here is my suggestion, it may be a bit easier than the other examples...

on the asp page, you can use the following commands such as...

request.form("variable")

this allows you to request the form information that you recieved on the previous page and you can use it on the next page either by setting it to a value like...

variable=request.form("variable")
obviously you need to put a variable name where ever I put the word variable.

Now to print this information to the asp screen you merely need to use the following commands...

response.write ("whatever you wanna say" & variable)

OR

response.write(request.form("variable"))

either one will work, the first is nice if you want to format or use the data and manipulate it before you put it onto the browser screen in the new asp page.

Hope this helps,
Whitewolf

For more help, email me
jgebelt@hotmail.com


0
 
LVL 1

Accepted Solution

by:
Whitewolf earned 50 total points
ID: 2679397
here is my suggestion, it may be a bit easier than the other examples...

on the asp page, you can use the following commands such as...

request.form("variable")

this allows you to request the form information that you recieved on the previous page and you can use it on the next page either by setting it to a value like...

variable=request.form("variable")
obviously you need to put a variable name where ever I put the word variable.

Now to print this information to the asp screen you merely need to use the following commands...

response.write ("whatever you wanna say" & variable)

OR

response.write(request.form("variable"))

either one will work, the first is nice if you want to format or use the data and manipulate it before you put it onto the browser screen in the new asp page.

Hope this helps,
Whitewolf

For more help, email me
jgebelt@hotmail.com


0
 

Author Comment

by:benzwong
ID: 2682193
Thanks for ur help.At least I've learned something.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to refresh a page from a sub domain in ajax ? 34 43
Responsive Font Size 6 45
How to calculate height of a text using jquery 3 41
How to escape unsafe HTML tags 4 36
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

735 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