Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Post a form WITHOUT javascript

Status
Not open for further replies.

ranta

Programmer
Jun 24, 2003
30
0
0
I am building a Bobby A accessible site complete with ecommerce which means I can not use any javascript on the site (or more accurately I need to ensure all functionality works without Javascript enabled).

The problem I have is that within the ecommerce process I am calling a stored procedure to add the order details to a pre-order table, this procedure returns the order number and some other critical information which I then store in a form and post to our payment provider using Javascript to automaticaly submit the form.

Is there any other way I can automaticaly submit this form without further interaction from the user?? ???? ??

Many thanks,
 
Can I clarify what's going on where here?

Customer makes a purchase by (presumably) filling in an HTML form & submitting it.

Server-side script (what language?) processes that order via this stored procedure, and displays another form with hidden info on it.

Javascript attached to the new form causes it to submit straight away, to the payment provider's site.


I don't think that's particularly inaccessible set-up, though it seems a bit weird to have that extra form+javascript step. What you need to be sure of is that users with javascript switched off - for whatever reason - are still able to submit the second form. How about adding a visible submit button labelled "Click here to complete the transaction" or similar?

Ideally, your back-end processing would redirect directly to the payment processor. It should be possible, but without knowing exactly how things are set up I'm not sure how to go about it.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
I am using ASP / HTML for the front end over an SQL2005 server.

The user will see the details of their order in the checkout page, this will contain info like the billing and delivery address, product details etc.

The user clicks the "Pay" button which submits a form with all the data to a processpayment page (not visable to the user). This page will receive in the form details and call an SQL procedure to write the details to the Pre-Order tables. At the end of the procedure it returns an order number along with some other data to the processPayment page. The information returned is then written into hidden fields in a form on the processpayment page which is then submitted via javascript sending the details to the payment provider.

This is the point where the site fails in terms of accessibility, the form can only be submitted automaticaly by javascript which could be turned off with some users.

I was hoping there was another, acessible way of automaticaly submitting the form as I don't want to have to return to the user for them to click "Complete Transaction" having only just clicked the "Pay" button..
 
why do you need to display the processpayment page at all? why can't you just pass the information directly from the result of the stored procedure to the payment provider?



*cLFlaVA
----------------------------
[tt]somebody set up us the bomb![bomb][/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
I'm not displaying the processpayment page, its part of the background process as far as the user is concerned. To contact the payment provider I need to submit the required fields in a form with a HTTPS request. i.e;

<form name="f1" method="post" action="
<input type="hidden" name="orderID" value="rs("orderID")"/>
<input type="hidden" name="amount" value="rs("orderAmount")"/>
</form>

How can I do this direct from the procedure without first storing the results of the procedure in a form and then submitting that form?
 
Oops, this isn't the coldfusion forum, but all backend languages have something similar. The server can do the form submit on the backend and get the results. If you need to actually forward the user to the server, then this might not be doable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top