Msg#: 3714202 posted 11:39 am on Aug 3, 2008 (gmt 0)
so I use ajax to validate form input, whenever user click on the "submit" button which I attached an "onclick" event to it, it calls the ajax function to the php validation script.
after everything is ok, I was able to add user's post into database, but the current page just sits there, it won't redirect user to another page, "index" page let say.
so how do I do this? I want to redirect user to some other page after let say they post a topic, but using ajax only check for onclick event. If I attached an onsubmit event, my ajax won't work anymore.
Msg#: 3714202 posted 6:57 pm on Aug 3, 2008 (gmt 0)
i got it.
answer: so we can't redirect (using server side code) to a different page after submitted a form using ajax to validate because that's the whole point of using Ajax in the first place. We can add a window.location to ajax handler to redirect.