Client script of UI page is not getting executed onloand when called from UI action
This content was last updated in 2024. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- 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.
Has anyone experienced the similar issue and know how to call client script on load?
Thank you
Shanti
- 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