473,498 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Set hidden values and then submit automatically

>From my page shopping cart page I want to send the amount value to the
following payment page:

<script type="text/javascript">
window.onload = function (evt) { document.forms[0].submit(); }
</script>

</head>

<body>
<form name="payform" method="post"
action="https://mmm.com/payment/start.pml">
<input type="hidden" id="amount" name="amount" value=""
runat="server" />
<input type="hidden" name="merchant" value="752" />
</form>

The amount value should be set in the hidden input and then the form
should be submitted autmatically to the payment company. I have
problems capturing and setting the amount value.

I've tried with:

Sub Page_load()
amount.Value = 1212
End Sub

But I receive an error message from the payment company telling me that
amount is missing.

Can someone help me think clear?

Regards,

S

Sep 4 '06 #1
2 3082
Did you check if the value is getting set in the hidden variable before
calling forms[0].submit function?

Regards,
Augustin
http://augustinprasanna.blogspot.com

"st****@gmail.com" wrote:
From my page shopping cart page I want to send the amount value to the
following payment page:

<script type="text/javascript">
window.onload = function (evt) { document.forms[0].submit(); }
</script>

</head>

<body>
<form name="payform" method="post"
action="https://mmm.com/payment/start.pml">
<input type="hidden" id="amount" name="amount" value=""
runat="server" />
<input type="hidden" name="merchant" value="752" />
</form>

The amount value should be set in the hidden input and then the form
should be submitted autmatically to the payment company. I have
problems capturing and setting the amount value.

I've tried with:

Sub Page_load()
amount.Value = 1212
End Sub

But I receive an error message from the payment company telling me that
amount is missing.

Can someone help me think clear?

Regards,

S

Sep 4 '06 #2


"st****@gmail.com" wrote:
From my page shopping cart page I want to send the amount value to the
following payment page:

<script type="text/javascript">
window.onload = function (evt) { document.forms[0].submit(); }
</script>

</head>

<body>
<form name="payform" method="post"
action="https://mmm.com/payment/start.pml">
<input type="hidden" id="amount" name="amount" value=""
runat="server" />
<input type="hidden" name="merchant" value="752" />
</form>

The amount value should be set in the hidden input and then the form
should be submitted autmatically to the payment company. I have
problems capturing and setting the amount value.

I've tried with:

Sub Page_load()
amount.Value = 1212
End Sub

But I receive an error message from the payment company telling me that
amount is missing.

Can someone help me think clear?
If you want to set it using page_load, could you not edit your HTML source
and use:

<input type="hidden" id="amount" name="amount" value="<%=intAmount%>"
runat="server" />

and declare and set intAmount somewhere else?

Sep 4 '06 #3

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

Similar topics

10
3676
by: Randell D. | last post by:
Folks, Perhaps someone can figure this out - this is 'the process of my script' I have a form whereby I can add multiple contacts to a single address. There is only one...
13
40617
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
8
17281
by: Matt Herson | last post by:
I have been trying to find a way to use JavaScript to change the value of a hidden field on submit. I am already invoking a JavaScript to handle the validation on submit. The reason I need to...
3
2553
by: Itai | last post by:
I have an aspx file named index.aspx which contains two ‘form' sections, one that has the runat=server attribute (e.g From1) and one which is a regular HTML form (e.g SignInForm). I am trying...
6
3887
by: Angus Comber | last post by:
Hello I am working with an external perl script. I can submit something like this: <form target="mycart" action="https://www.website.com/cgi-bin/" method="post"> <input type="image"...
0
1105
by: Ben | last post by:
Hi All, I have a web app which uses Frames, frame 1 with search criteria(1.aspx) and frame 2 with results(2.aspx). Frame2 in turn posts to a servlet(action="servlet URL") and the report parameters...
5
2043
by: pbd22 | last post by:
hi. i have a hidden iframe for uploading files. when i check the httpfilecollection on the server, it is always zero - the files never make it to the server. i know all the javascript is working...
3
4686
by: simora | last post by:
Hi: Need some working sample code to post hidden form data from a php page to a new popup window. 540 x 500 centered. The popup that I'm calling already is formatted and has a TITLE:web-2007.php...
5
7322
by: dmorand | last post by:
I'm having a strange issue with a form I'm developing. I'm saving some values to hidden fields when a user clicks a button. I setup a function which gets ran on submission of the form, but I also...
0
7125
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
7165
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
7203
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
6885
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
7379
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...
1
4908
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
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1417
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
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.