Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to navigate jsp other jsp from JavaScript method
Hi,
We are currently using the following code to navigate to another jsp on click of button:
We need to call a javascript method inside jsp on click of button which will then navigate to different jsp .
Thank you
Ram
We are currently using the following code to navigate to another jsp on click of button:
<aui:button onclick="<%= addEntryURL.toString() %>" value="Create Expense"></aui:button>We need to call a javascript method inside jsp on click of button which will then navigate to different jsp .
Thank you
Ram
HI,
Remove onClick and call javascript method where you can redirect to another jsp:
OR
HTH
Remove onClick and call javascript method where you can redirect to another jsp:
<portlet:renderurl var="redirectURL" />
<script>
function redirect() {
window.location.href = '${redirectURL}';
}
</script>OR
document.frm.action = "<%=redirectURL.toString() %>";
document.frm.submit();HTH
Dear Gnaniyar,
thank you so-mach ,
it is working fine now.
Thank you
Ram
thank you so-mach ,
it is working fine now.
Thank you
Ram