Solved

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

Posted on 2000-03-30
5
151 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Timer on div 5 35
Text color and background in a text box. 2 36
How do I update select listbox after search 2 49
CSS - how to make button/link change to black on hover? 2 35
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 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