File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head lang ="en ">
4+ < meta charset ="utf-8 ">
5+ < link rel ="stylesheet " href ="http://yegor256.github.io/tacit/tacit.min.css "/>
6+ </ head >
7+ < body >
8+ < form id ="checkout-selection " method ="POST ">
9+ < input type ="radio " name ="checkout " value ="automatic "> Automatic Checkout Demo< br >
10+ < input type ="radio " name ="checkout " value ="orders "> Manual Checkout Demo< br >
11+ < input type ="submit " value ="Submit ">
12+ </ form >
13+ < script type ="text/javascript " src ="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js "> </ script >
14+ < script >
15+ jQuery ( document ) . ready ( function ( $ )
16+ {
17+ var form = $ ( '#checkout-selection' ) ;
18+ var radio = $ ( 'input[name="checkout"]' ) ;
19+ var choice = '' ;
20+
21+ radio . change ( function ( e )
22+ {
23+ choice = this . value ;
24+ if ( choice === 'orders' )
25+ {
26+ form . attr ( 'action' , 'pay.php?checkout=manual' ) ;
27+ }
28+ else
29+ {
30+ form . attr ( 'action' , 'pay.php?checkout=automatic' ) ;
31+ }
32+ } ) ;
33+ } ) ;
34+ </ script >
35+
36+ </ body >
37+ </ html >
You can’t perform that action at this time.
0 commit comments