Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

UI Script trigger

swamy_in
Kilo Explorer

How is a UI Script actually triggered? If a Global UI Script is written and is Active does it get triggered on each iframe/page load? I understand it may not be the optimal way of implementing a change - but wanted to understand where and how the UI Script is being triggered.

1 ACCEPTED SOLUTION

so, if you have a page with an iframe and the only content in your script is alert('ui script ran') you will see 2 alert messages. the functions will be available to call site wide say you just have a declaration for


function test(){


        alert('test function');


}



this will be available to be called in both the main page and the iframe.



hope this helps


View solution in original post

4 REPLIES 4

Harish Murikina
Tera Guru

Ui Script can trigger each and every page if it is active .


ahaz86
Mega Guru

a UI script will be triggered for every page AND iFrame. so if you have a page with an iframe, this will be run twice


Thanks - that helps. Will it be "loaded" twice or "run" twice - say   if there is a UI Script that has functions which are getting invoked only from within a page [UI page] present within an iframe?


so, if you have a page with an iframe and the only content in your script is alert('ui script ran') you will see 2 alert messages. the functions will be available to call site wide say you just have a declaration for


function test(){


        alert('test function');


}



this will be available to be called in both the main page and the iframe.



hope this helps