Client script of UI page is not getting executed onloand when called from UI action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2024 06:01 AM
Hi,
We have a function created in the Client script of UI page and trying to execute it on the load of the UI page.
<body onload = 'sayHello()'></body>
when I use try it on UI page, the function getting executed, however when I call ui page from ui action, it is not working.
Has anyone experienced the similar issue and know how to call client script on load?
Thank you
Shanti
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2024 11:06 AM
Hello @Shanti7
PLease try below scripts:
- Jelly script:
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<body onload="sayHello()"></body>
</j:jelly>
- Client script:
function sayHello() {
alert("Hello");
}
- UI action:
function openPage() {
var gdwUploadSheet = new GlideDialogWindow('pageName');//change it as per your record
gdwUploadSheet.setSize(400,400);
gdwUploadSheet.render();
}
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar