php order page to refresh for check order when radio buttoni

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
berni358
Forum Newbie
Posts: 4
Joined: Wed Apr 21, 2004 11:06 am

php order page to refresh for check order when radio buttoni

Post by berni358 »

Does any one have input on the most effective way to accomplish the following:

I have an order page that by default is set to capture credit card order.
It is a php page that tracks product info, prices etc.

I am wanting to incorporate the ability for the consumer to pay by echeck.
So I have placed a radio button on the top and if selected reload the php order page and if the php order page detects that the pay by check button was selected present order page with check capturing fields instead of credit card fields.

The reload is working, however for some reason the detection of the pay by check radio button press is not working.

I have tried $_GET["paymentmetod"], etc . which is the name of the radio button.

I want to detect if radio button was selected and reload/refresh page with paybycheck form instead of pay by credit card maintaining product info.

Thanks
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

show us your code

Mark
berni358
Forum Newbie
Posts: 4
Joined: Wed Apr 21, 2004 11:06 am

Post by berni358 »

Here is the code.

Right nwo I simply am ttying to get to thepoint that I know the php is detecting the value of the radio button paymentmethod and then I can take out test stubs and switch form contents tp check order form details. Thaks for your response.

[Edit:
This message was cut in pieces. Sorry for this, but please read:
viewtopic.php?t=21171
--JAM]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

no one's going to really read all that without code or php tags helping format it!

Scanning the code real quick.. you won't be able to detect what the paymentmethod was if you don't submit the form. That is, if you want to do this with php. You can do a partial form swap using Javascript and CSS. Or you could just show all the parts with straight HTML, and have the php processor of the form to only pay attention to the payment method they selected.
berni358
Forum Newbie
Posts: 4
Joined: Wed Apr 21, 2004 11:06 am

Post by berni358 »

Thansk I will scope it down and do it all in php to see if i can tell different approaches.
berni358
Forum Newbie
Posts: 4
Joined: Wed Apr 21, 2004 11:06 am

Post by berni358 »

well are ther any classes or code snippets that exist that anyone knows of for a php script to use javascript onclick method and reload the page and the php script detect the value of the radio button?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

onclick="document.formsї0].mode.value='reload';document.formsї0].submit()"
mode is a hidden value that helps reload the page in the proper.. mode. :)
Post Reply