How to Redirect URL in UI page
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 10:26 PM
Hi All,
I have a requirement where I need to redirect to the portal page from UI page.
Tried with "gs.setRedirect(url);" But it didn't help much.
Also, I need to hide one button in UI Page.
Please advise on this.
Thanks.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 02:34 AM
Hi @MohanambalN ,
can you try something like this
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<h1>My UI Page</h1>
<button id="myButton" onclick="redirectToPortal()">Click Me to Redirect</button>
<script>
function redirectToPortal() {
window.location.href = "/sp?id=sc_category"; // Replace 'your_portal_page' with the actual page ID or URL
}
</script>
</j:jelly>
Please mark helpful & correct answer if it's really worthy for you.
Thanks,
BK