javascript - window.onload() not working with html content generated by proprietary fwk -


i using mobile application development framework adf mobile whereby develop cross-platform mobile applications.ui layer can developed set of components (amx) generate html5 based user interface , dom structure can debugged ios simulator+ safari browser builtin debugger. adf mobile internally uses cordova

i need have javascript called when page completes loading. tried various approaches

$(document).ready(function () {     console.log("just inside  $(document).ready()"); });  window.onload = function () {     //handler function };  /* $(window).load(function () {     //handler function }); $(window).bind('load', function () {     //handler function });  window.addeventlistener("load", handlerfunction); */ 

everything related 'load' event fails 'ready' event getting fired expected. once handler function associated "load" event, when inspect window object of html using safari dom debugger, onload attribute has handler function assigning issue is not getting fired when page loaded.

can starters on debugging issue? or pointers in getting workarounds do.

i more interested in knowing how entire mechanism works.

how ,

$(window).on('unload', function(){       return 'are sure want leave?'; }); 

actually browsers such google chrome might block if attempt alert in window unload.

replace alert console.log or else less intrusive user , event happily called.

hope helps you.....


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -