javascript - Onsubmit URL Redirection with jquery -
I'm looking for the best way to perform onsubmit URL redirection.
Currently I have a form like this ..
& Lt; Input type = "submit" value = "go" />
At present it is dologin.php to me clientare.php
Directing for I can not make any changes in dologin.php because it has been encoded.
I want to be prompted as soon as the button is clicked, I need to redirect to clientdetails.php .
How can I get it?
Thanks
UPDATE
How do I currently do this? ...
& lt; Script type = "text / javascript" language = "javascript" & gt; Function Redirect () {window.location.href = '/clientarea.php?action=details'; } & Lt; / Script & gt; & Lt; Form action = "dololin.fp?" Onsubmit = "setTimeout ('redirect ()', 1000);" Method = "post" id = "frmlogin" & gt; & Lt; Input type = "hidden" value = "some" /> & Lt; Input type = "submit" value = "go" />
This is my purpose, even if the login credentials fail, but also define the errors and paste the page to login.
I was just looking at whether there is any better / other way
Modify the form action to read in the form:
& lt; Form action = "clientdetails.php" method = "post" & gt; & Lt ;! - etc - & gt;
Bam your forms are now posted directly to clientdetails.php.
Now, if you want to submit dologin.php and then go to clientdetails.php, perhaps Dologin.php is some processing that you want, you're out of luck; There is no such way that you can redirect client-side without making sure that the correct JavaScript comes back to redirect to the desired URL to present dologin.php. Undoubtedly, you will be better off creating Dolgan.fpp instead, send an HTTP redirect, but if you are doing this with Javascript you can do this.
But by any means, you is
edit:
@Randolpho: PHP files are encoded in IonCube.
- MANnDAaR
So you are trying to hack a third party PHP application that is ambiguous to stop hacking? I contact PHP application developers to see if they have some mechanism for specifying redirection. Most login forms allow you to pass destination URLs as destination string parameters. You may be able to gather the format even from your web logs without disturbing the developers.
Either way, you clearly indicate that you are dealing with third-party code in your question. Without adequate information we can not help you solve your problem.
Comments
Post a Comment