vendredi 4 juillet 2014

Ext.onReady for Ajax call

We have the following existing code

-------------------common js --------Ext.onReady(function(){

Some initialization of div tags on main.jsp

....

...


---------------end common js -------


------------------main js -------

div elements...

---------------end main js ---------


We need to introduce content in tag from AJAX calls

So now

-------------------common js --------

Ext.onReady(function(){

Some initialization of div tags on main.jsp

....

...

---------------end common js -------


------------------main js -------

Ext.onReady(function(){

AJAX calls to extract div elements from backend...

div elements.html = data retrieved

---------------end main js ---------

But by the time div receive data from AJAX, the common.js has already run and div elements do not get massaged by the code in common js. Is there anyway to avoid this? I cannot remove common js out of the main.jsp due to design constraints. Pl help





Aucun commentaire:

Enregistrer un commentaire