How to code payment form in a modern way

How to code payment form in a modern way

Hey guys , so suppose you have 3 forms , like so:


Now how would you code these form's in a modern way ?  I.E. i beleive in the pre-AJAX period  the form's would be separate pages , but what about now , i would really like the forms to us some ajax and then once the first form is submitted i would like the 2nd form to come in with some animation and so on ....

So now , how exactly do i store the 2nd and 3rd form ?? iframe ??