I have a tabset that loads an edit page into a tab on the details page of a user edit. I create the tabs dynamically and they are loaded from the server when the tab is clicked.
I have javascript code that needs to run when this tab is loaded so that calendar and autocomplete controls are available.
How can I ensure that the javascript existing in the imported html is loaded? Is this possible to do.
I have tried various events on the tab such as beforeDataLoadedChange and contentChange but to no avail.
if you want an event to fire when you click on a tab you can use
activeTabChangeevent , check this example http://jsfiddle.net/ekcgd/.However for an event that gets fired if data or contents inside a tab is loaded you may try using loadHandler which is called when a request to pull your data from server has success or failure.
modify this default loadHandler to fire a custom event on success and subscribe to that event so that you can run js code that you need .