- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2016 09:28 PM
Hi All,
I have a dynamic block on homepage , in dynamic content I have created a button and onclick of button I am calling a function and based on the input(userid) given , reports will be populated for that particular user. This is working fine.
But i want the same functionality ,When the homepage loads, it should get logged in user id and populate records.
I tried calling function in div tag but its not working, how to call function onload in jelly script.
Thanks in advance.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2016 11:44 PM
Add this to your existing script below xyz function defintion
addLoadEvent( function() {
xyz();
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2016 09:37 PM
Hi,
You can create a UI script which is global. and can check
if (window.location.pathname.indexOf('home.do') == 1) { // you can call your function here}
Hope this helps!.
Thanks,
Apurva Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2016 09:47 PM
Hi Apurva ,
Thanks for your response. I want it for one particular Homepage. I am using Dynamic Content and added it to that homepage. Onload I want to load reports with logged in user ,then they should also have a button to check for other users. I am done with second part , not aware about onload thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2016 09:42 PM
Hi Jeevitha,
Include the below script in your 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">
<script>
addLoadEvent( function() {
onLoadFunction();
});
</script>
</j:jelly>
Client script:
function onLoadFunction()
{
// Yor statements in onload function
}
Thanks and regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2016 09:48 PM
Thanks Amaradi , will try it.