How to redirect a jsp to another jsp on the click of cancel button
I want to redirect my jsp page to another jsp page on the click
of cancel button without the validations been called on the click of
Actually in my code when i click the cancel button it
pls can anybody help me
thanks and regards,
Remove the event for the button
Originally Posted by java_crazy
Can you show the code you now use?
i tried this code.
this is working in Mozilla but not internet explorer
<a href="CardDetailForm.jsp"><input type="button" value="Cancel" name="cancel"/></a>
Why you would do something like this is puzzling.
<a href="CardDetailForm.jsp"><input onclick="this.parentNode.href=null;" type="button" value="Cancel" name="cancel"/></a>
It depends on the meaning of "cancel" in the application but in general you should never go from one JSP to another. Your JSP should post to a servlet that deals with the request then forwards to the other JSP.
My code given above is working properly in mozila but not in internet explorer
can anybody help me
what is the reason ie is not able to recognise
i also tried the code suggested by fang
but this not working in both
The code prevents the link from working.
Perhaps we don't fully understand what you want to cancel.
Actually i dont want to cancel anything but
just want to redirect my jsp to another jsp on the click of
cancel button thats it
Thanks 4 your help
At last, my problem has been solved
I used the following code which is working
You should be detecting the button return value server side and processing the form accordingly.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)