Fire Fox 3.6 - location.href not working in JSP
Posted
by user299873
on Stack Overflow
See other posts from Stack Overflow
or by user299873
Published on 2010-03-25T12:42:41Z
Indexed on
2010/03/25
12:43 UTC
Read the original article
Hit count: 445
firefox-3.6
I have jsp page with method = POST and action='/mydir/mypage/nextpage'
I have a button :
< button title='Continue' onclick="this.form.perform.value='cancelButton'; javascript:doCloseWindow();" >Continue < /button >
and java script method like:
function doCloseWindow(){
location.href = "https://abc.xyz.com/mydir/?param=123";
}
It does not work in fire fox 3.6. On click of button; it redirects to the path I mentioned in form action.
With Tamper data I find that the request goes to URL ( as in method ) with GET and then it re-directs to form's action URL.
I added return false in the method call also.-- javascript:doCloseWindow();return false"
I tired various combination like
window.location.href = "https://abc.xyz.com/mydir/?param=123";
window.document.location.href = "https://abc.xyz.com/mydir/?param=123";
document.location.href = "https://abc.xyz.com/mydir/?param=123";
But no success.
© Stack Overflow or respective owner