473,473 Members | 4,204 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

POST data to a new page

Hi all,

Sorry if this sounds a little ambiguous, but....

I have a page with 4 submit buttons. How can I make 1 of these buttons spawn
a new page AND use the data posted from the orginal page?

Can this be down. I know I could do it with a querystring but I perfer not
too.

Cheers, Bill.
Jul 19 '05 #1
6 1549
William E Hatto wrote:
Hi all,

Sorry if this sounds a little ambiguous, but....

I have a page with 4 submit buttons. How can I make 1 of these
buttons spawn a new page AND use the data posted from the orginal
page?

Can this be down. I know I could do it with a querystring but I
perfer not too.

Cheers, Bill.


Set the target attribute of the form element to "_blank".

Bob Barrows.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #2
Thanks Bob,

I only want one of the submit buttons to lauch a new window though.

Any ideas.

Thanks Bill.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OA**************@TK2MSFTNGP09.phx.gbl...
William E Hatto wrote:
Hi all,

Sorry if this sounds a little ambiguous, but....

I have a page with 4 submit buttons. How can I make 1 of these
buttons spawn a new page AND use the data posted from the orginal
page?

Can this be down. I know I could do it with a querystring but I
perfer not too.

Cheers, Bill.


Set the target attribute of the form element to "_blank".

Bob Barrows.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 19 '05 #3
The target attribute can be changed dynamically using client-side code.
Please go to a dhtml or scripting group for future help with this.

I would change the INPUT from a Submit to a Button, and use this in the
onclick event:

var oForm =document.getElementByID("form_id")
oForm.target="_blank"
oForm.submit()

HTH,
Bob Barrows

William E Hatto wrote:
Thanks Bob,

I only want one of the submit buttons to lauch a new window though.

Any ideas.

Thanks Bill.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OA**************@TK2MSFTNGP09.phx.gbl...
William E Hatto wrote:
Hi all,

Sorry if this sounds a little ambiguous, but....

I have a page with 4 submit buttons. How can I make 1 of these
buttons spawn a new page AND use the data posted from the orginal
page?

Can this be down. I know I could do it with a querystring but I
perfer not too.

Cheers, Bill.


Set the target attribute of the form element to "_blank".

Bob Barrows.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #4
Thanks Bob :-)
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
The target attribute can be changed dynamically using client-side code.
Please go to a dhtml or scripting group for future help with this.

I would change the INPUT from a Submit to a Button, and use this in the
onclick event:

var oForm =document.getElementByID("form_id")
oForm.target="_blank"
oForm.submit()

HTH,
Bob Barrows

William E Hatto wrote:
Thanks Bob,

I only want one of the submit buttons to lauch a new window though.

Any ideas.

Thanks Bill.

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OA**************@TK2MSFTNGP09.phx.gbl...
William E Hatto wrote:
Hi all,

Sorry if this sounds a little ambiguous, but....

I have a page with 4 submit buttons. How can I make 1 of these
buttons spawn a new page AND use the data posted from the orginal
page?

Can this be down. I know I could do it with a querystring but I
perfer not too.

Cheers, Bill.

Set the target attribute of the form element to "_blank".

Bob Barrows.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 19 '05 #5
Bob Barrows [MVP] wrote:
The target attribute can be changed dynamically using client-side
code. Please go to a dhtml or scripting group for future help with
this.

I would change the INPUT from a Submit to a Button, and use this in
the onclick event:

var oForm =document.getElementByID("form_id")
oForm.target="_blank"
oForm.submit()


Don't forget to reset the target afterward, or all buttons will adopt the
"new window" behavior. For example:

oForm.target = "_blank"
oForm.submit()
oForm.target = self

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
Dave Anderson wrote:
Don't forget to reset the target afterward, or all buttons will adopt
the "new window" behavior. For example:


:-)
I left that as an exercise for the reader.

Bob

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #7

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

Similar topics

3
by: Bernd Kohler | last post by:
Hello, I got an annoying problem using the POST-method to send a form's data: I put a login-form on the page which is sent by the POST-method to itself. After that the content of the...
2
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser ...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
1
by: David | last post by:
I need to redirect to a page and HTTP Post data. The Response.Redirect does not work and the HTTPREQUEST option calls the page and waits for a response, but I need to transfer control to the...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
2
by: rynato | last post by:
I have a form which the user fills out to enter some data. If there already exists an uncompleted session - say, the user started entering some data but had to stop to do something else - the...
5
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I am trying to create ASPX code which will allow me to redirect a user to another site with POST data. I figure that the best way to do this is with JavaScript to the client. Here's what I'm doing:...
56
by: UKuser | last post by:
Hi, I'm not sure if this can be done as I've searched the web and this forum. I am using an online merchant provider and I must post certain variables to their webforms through a form on my...
7
by: php_mysql_beginer911 | last post by:
Hi .. hope someone will help i am trying to figure it out why i cannot post string "union select" every time i try to post data which content union and select .. the page doesn't get posted and...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.