Hello,
I am looking for best way to do Onsubmit URL Redirection.
Currently I have form like this...
<form action="dologin.php?" method="post" id="frmlogin">
<input type="hidden" value="something" />
<input type="submit" value="go" />
Currently this dologin.php is directing me to clientarea.php
I cant make any changes in dologin.php as it is encoded.
I want me to redirect to clientdetails.php as soon as button is clicked.
How can I achieve ?
Thanks
UPDATE
Currently How I do this....
<script type="text/javascript" language="javascript">
function redirect() {
window.location.href = '/clientarea.php?action=details';
}
</script>
<form action="dologin.php?" onsubmit="setTimeout('redirect()', 1000);" method="post" id="frmlogin">
<input type="hidden" value="something" />
<input type="submit" value="go" />
This Do my purpose, Even if login credentials fails it stick to login page with defining errors.
I was just looking for if there is any better/another way of doing it.