I haven't wrote the code yet because I want to make sure I can do what I want it to before writing it, but here is some (very) rough pseudo code:
//Upon initial load
open first div
form1 start
textbox1.1
textbox1.2
submit
close first div
//after ajax call
open first div
display userId generated by php and returned by ajax
display the data from form1 as returned by ajax
display additional data supplied by php/ajax
close first div
open second div
form2 start
textbox2.1 //should be equal to the userId generated by php above
textbox2.2
textbox2.3
submit form2
close second div
Assigning the value to form2>textbox1 would work using the .value attribute, but if at all possible, I would like to do this without modifying my ajax function since I use it for hundreds of pages already. If it is necessary to use this method, I can duplicate my ajax function and make the mods just for this page, but I would rather not.
Maybe I am going about this the wrong way... is there a way to modify the url/post data of a page using ajax (without refreshing)? For instance, can I just write the data in form1 to the url (in addition to the ajax get) so that it can be used by php during the scripting of form2?