-
how to submit a HTML form
hello all,
I want to submit an HTML form on clicking the 'Checkout' button in the 'ShoppingCart.aspx' page. How I can do it?
I have done the following coding for HTML form:-
Code:
<form name="frmCart" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" value="admin@MUKI.com" name="business">
<input type="hidden" value="Black Color" name="on0">
<input type=hidden value="<%=Session["ItemNames"]%>" name="item_name" >
<input type=hidden value="<%=Session["ItemNumbers"]%>" name=item_number >
<input type="hidden" value="<%=Session["TotalAmt"]%>" name="amount">
<input type="hidden" value="2" name="no_shipping">
<input type="hidden" value="admin@MUKI.com/Paymentdone.aspx" name="return">
<input type="hidden" value="admin@MUKI.com/Paymentcancel.aspx" name="cancel_return">
<input type='hidden' name='cn' value='Memo for your Reference:'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='lc' value='US'>
<input type='hidden' name='bn' value='PP-ShopCartBF'>
<input type='hidden' name='rm' value='POST'>
</form>
Last edited by ani.since1982; 01-16-2008 at 11:30 PM.
-
The submit button must be between the <form> tags:
Code:
<form name="frmCart" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" value="admin@MUKI.com" name="business">
<input type="hidden" value="Black Color" name="on0">
<input type=hidden value="<%=Session["ItemNames"]%>" name="item_name" >
<input type=hidden value="<%=Session["ItemNumbers"]%>" name=item_number >
<input type="hidden" value="<%=Session["TotalAmt"]%>" name="amount">
<input type="hidden" value="2" name="no_shipping">
<input type="hidden" value="admin@MUKI.com/Paymentdone.aspx" name="return">
<input type="hidden" value="admin@MUKI.com/Paymentcancel.aspx" name="cancel_return">
<input type='hidden' name='cn' value='Memo for your Reference:'>
<input type='hidden' name='currency_code' value='USD'>
<input type='hidden' name='lc' value='US'>
<input type='hidden' name='bn' value='PP-ShopCartBF'>
<input type='hidden' name='rm' value='POST'>
<input type="submit" value="Checkout">
</form>
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
hi Philweber,
Is there need to give ID of 'CheckOut' button in the .aspx page as a 'CheckOut' because you also gave the value of submit type as 'CheckOut'?
exp:- <input type="submit" value="Checkout">
I have to perform some validation on the 'CheckOut' button in the .aspx page and after that this form should be submitted. Can it be possible by simply putting the above tag in the form?
thanks
Similar Threads
-
Replies: 1
Last Post: 03-29-2005, 06:40 AM
-
By John A Grandy in forum .NET
Replies: 0
Last Post: 07-06-2002, 10:39 PM
-
By Mark Nicks in forum ASP.NET
Replies: 0
Last Post: 05-19-2002, 02:13 PM
-
By Simon Jessop in forum ASP.NET
Replies: 0
Last Post: 01-13-2002, 01:11 PM
-
Replies: 2
Last Post: 06-17-2000, 03:20 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|