marf Posted June 6, 2007 Share Posted June 6, 2007 I am currently wondering how to go about this. I have lets say index.php with all kinds of divs and such. One of the divs, I have load signup.php within the div using XMLHTTPRequest. So that form shows up perfectly fine within my div. However what I'm wondering is, when they fill in the form and click Sign Up, I will of course do the necessary database insertions/confirmation e-mail, and I want it to Load a new page in the Div. What I'm wondering is do I have the <form> in signup.php do a post or get action, and will pressing submit cause the actual loading of a whole new page? because I don't want it to load a new page, I just want it to do the necessary php code and then return a value to the Div saying either (completed) or (error). Anybody done anything similar to this? Thanks Quote Link to comment Share on other sites More sharing options...
r-it Posted June 8, 2007 Share Posted June 8, 2007 make the form tag only hav a method and not an action and have a form name and id, then you have a button instead of a submit, which will have an onclick event that calls a javascript function which will do your processing, and there is no need to do call a new page, the javascript will handle all your requests to the server and the php wil be seperate, and all you need to do there is get the responsetext, and fill the div which had the form with the thank you message received from php Quote Link to comment Share on other sites More sharing options...
marf Posted June 8, 2007 Author Share Posted June 8, 2007 hehe thanks I figured that part out now. I have another problem on the other post here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.