Open nightrider77 opened 5 months ago
It seems to me, .innerHTML doesn't execute scripts inside html. So the only solution is to run scripts inside oncreate event function. This makes switching to this winbox lib very painful...
Do the scripts need to interact with the parent page? If not you could just use an iframe instead of ajax.
I am getting data ( html + script type="text/javascript" inside it) with ajax request. After this, I create window as the following:
new WinBox( { html: data } );
But all JavaScript code, passed within data parameter, is completely ignored. But html shows correctly.
Why?