Hello guys!
I have a form and when the user sumbit it a javascript function will be called using onsubmit event. I need to call the function because I need some AJAX code to be executed. And after it's finished, the page needs to be redirected to another page. But I don't know how to do it.
If the new page was something constant I could have put its address in "action" of the form, but the new page is changeable and depends on the input the user has entered.
I tried to use "location.href=..." at the end of javascript function but it didn't work.
Is there any way to do it?
Thanks.