473,395 Members | 1,343 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,395 software developers and data experts.

Post to another url

Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also redirect to
this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt
Nov 18 '05 #1
7 1981
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also redirect to this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt

Nov 18 '05 #2
> 2) use client side script to change your ASP.NET form action attribute
Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the runat= 'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also
redirect to
this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt


Nov 18 '05 #3
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
2) use client side script to change your ASP.NET form action attribute

Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the

runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also

redirect
to
this url :-). I dont' want to change the webpage interface, so how can I POST partial form info? by using a tmp url???
TIA
-matt



Nov 18 '05 #4
You can have as many submit buttons as you want, but no matter which of them
is clicked, it will do the same as the others (submit the data according to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()).
"Matt" <m@m.net> wrote in message
news:ea*************@tk2msftngp13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
2) use client side script to change your ASP.NET form action attribute Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the

runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3*************@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> Not very sure about this. I have one button (not a submit button) will > "post" partial page(form) info to another url(the user will also

redirect
to
> this url :-). I dont' want to change the webpage interface, so how
can I > POST partial form info? by using a tmp url???
>
>
> TIA
>
>
> -matt
>
>



Nov 18 '05 #5
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>");
Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form action=url method="post"><input type="hidden" name="cmd"
value="_xclick">
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of them is clicked, it will do the same as the others (submit the data according to the ACTION of the form tag).

You can submit via JavaScript (form.submit()).
"Matt" <m@m.net> wrote in message
news:ea*************@tk2msftngp13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
> 2) use client side script to change your ASP.NET form action attribute Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:OE**************@TK2MSFTNGP11.phx.gbl...
> Here's some ideas for you.
> 1) Output an old fashioned non-server form to the client (without the runat=
> 'server' attribute) Set the action attribute like you would have in
> ASP.OLD, and use javascript to submit the form.
> 2) use client side script to change your ASP.NET form action attribute > 3) use this webform control: http://www.wilsondotnet.com/Controls/
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
>
>
>
> "Matt" <m@m.net> wrote in message
> news:O3*************@TK2MSFTNGP11.phx.gbl...
> > Hi all,
> >
> > Not very sure about this. I have one button (not a submit button)

will > > "post" partial page(form) info to another url(the user will also
redirect
> to
> > this url :-). I dont' want to change the webpage interface, so how

can
I
> > POST partial form info? by using a tmp url???
> >
> >
> > TIA
> >
> >
> > -matt
> >
> >
>
>



Nov 18 '05 #6
What are you trying to do on this page? Where does the form's "url" get a
value? You need to give your form a name so that the script can call it,
rather than just generically "form". You should also put the script below
the form in the code. You also don't need the for=window event=onload if
you are not going to place the script in a function.
"Matt" <m@m.net> wrote in message
news:eE*************@TK2MSFTNGP09.phx.gbl...
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>"); Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form action=url method="post"><input type="hidden" name="cmd" value="_xclick">
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of

them
is clicked, it will do the same as the others (submit the data according

to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()).
"Matt" <m@m.net> wrote in message
news:ea*************@tk2msftngp13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
> > 2) use client side script to change your ASP.NET form action attribute > Can I have more insight on this or 1)
>
>
>
> "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
> news:OE**************@TK2MSFTNGP11.phx.gbl...
> > Here's some ideas for you.
> > 1) Output an old fashioned non-server form to the client (without the > runat=
> > 'server' attribute) Set the action attribute like you would have in > > ASP.OLD, and use javascript to submit the form.
> > 2) use client side script to change your ASP.NET form action attribute > > 3) use this webform control: http://www.wilsondotnet.com/Controls/
> >
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> >
> >
> >
> >
> > "Matt" <m@m.net> wrote in message
> > news:O3*************@TK2MSFTNGP11.phx.gbl...
> > > Hi all,
> > >
> > > Not very sure about this. I have one button (not a submit
button) will
> > > "post" partial page(form) info to another url(the user will also
> redirect
> > to
> > > this url :-). I dont' want to change the webpage interface, so
how can
I
> > > POST partial form info? by using a tmp url???
> > >
> > >
> > > TIA
> > >
> > >
> > > -matt
> > >
> > >
> >
> >
>
>



Nov 18 '05 #7
I don't want to disable all other attributes rather than the info need to be
POSTed on same page(page1), so I redirect it (when button1 clicking) to
another page with a simplified form and automaticlly submit the form when
the window is loading. I'm suspecting this is not the best way though.

The button1 is actually a PayPal buynow button which just asks some
particular info it needs, a subset of my form's attrs(the page is a signup
page). I'm still looking a more elegant way :-).

Thanks for all tips. It works now.

"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
What are you trying to do on this page? Where does the form's "url" get a
value? You need to give your form a name so that the script can call it,
rather than just generically "form". You should also put the script below
the form in the code. You also don't need the for=window event=onload if
you are not going to place the script in a function.
"Matt" <m@m.net> wrote in message
news:eE*************@TK2MSFTNGP09.phx.gbl...
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>");
Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form action=url method="post"><input type="hidden"

name="cmd"
value="_xclick">
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet.net> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of
them
is clicked, it will do the same as the others (submit the data
according
to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()).
"Matt" <m@m.net> wrote in message
news:ea*************@tk2msftngp13.phx.gbl...
> It likes that I have two buttons, one for submitting whole form to
one url
> and another submiting partial form info to another url via "post".
So > problem are these:
> 1) can I have two "submit" buttons in one form?
> 2) if no, can I simulate "submit"? If I can simulate, how about NN?
>
>
>
> "Matt" <m@m.net> wrote in message
> news:%2***************@tk2msftngp13.phx.gbl...
> > > 2) use client side script to change your ASP.NET form action

attribute
> > Can I have more insight on this or 1)
> >
> >
> >
> > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
> > news:OE**************@TK2MSFTNGP11.phx.gbl...
> > > Here's some ideas for you.
> > > 1) Output an old fashioned non-server form to the client (without the
> > runat=
> > > 'server' attribute) Set the action attribute like you would

have in > > > ASP.OLD, and use javascript to submit the form.
> > > 2) use client side script to change your ASP.NET form action

attribute
> > > 3) use this webform control:
http://www.wilsondotnet.com/Controls/ > > >
> > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > >
> > >
> > >
> > >
> > > "Matt" <m@m.net> wrote in message
> > > news:O3*************@TK2MSFTNGP11.phx.gbl...
> > > > Hi all,
> > > >
> > > > Not very sure about this. I have one button (not a submit

button) will
> > > > "post" partial page(form) info to another url(the user will also > > redirect
> > > to
> > > > this url :-). I dont' want to change the webpage interface, so how can
> I
> > > > POST partial form info? by using a tmp url???
> > > >
> > > >
> > > > TIA
> > > >
> > > >
> > > > -matt
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #8

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

Similar topics

2
by: luu duong | last post by:
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page that is inside a frameset. So firstpage.asp has...
0
by: nik | last post by:
I have a postback on an aspx-page. In this postback I perform a redirect. The page is quite heavy, so instead of performing a postback I perform a post to another empty page, which then can do the...
8
by: Victor | last post by:
I need to redirect to another web page, but that redirect will include the submission of form data. So, unlike ServerXMLHTTP which stays on the originating web page, I need the script to redirect...
6
by: someone | last post by:
I am in a situation where I need to package some information from Page1, submit it via POST to another server which will process the information and then send the user to another page on my server...
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 ...
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...
3
by: gustav | last post by:
Hey there, I have this problem: I´m migrating an ASP site to ASP.NET 1.1, and I find myself stuck because of this Form that has some inputs to access an Extranet... When the user submits, the...
3
by: BVS | last post by:
Presently, my website which is written in c# uses this command to move around my site: Response.Redirect("products.aspx?pro="+thechosenproduct) Is there a way to switch this to a POST method...
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:...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.