hi all,
i'm using html , javascript & mod_python
i want to submit html form
i used
document.formName.submit();
after submitting
i want to redirect to new page
--i tried location="newpage.html" NOT working
hi all,
i'm using html , javascript & mod_python
i want to submit html form
i used
document.formName.submit();
after submitting
i want to redirect to new page
--i tried location="newpage.html" NOT working
Unless you're submitting the form with AJAX then submitting will take the user to a new page, so you can't do a javascript redirect.
You could redirect on the server side, or change the action of the form.
Use ajax to submit the form. Then onSuccess callback, set window.location = new_url.
Req.write('location.href="page.py?fn=xxx";')
at the end of the python function that to be executed while submit
thnx all