简体   繁体   中英

Tinybox does not run (eval) javascript code

I am using Tinybox (http://www.scriptiny.com/2009/05/javascript-popup-box/) for my popup operations.

Although, when I load a page in the popup and have a script tag in it, it does not work.

Anyidea how I can fix this ?

eg

<script>
  alert('hello world');
</script>

Tinybox uses innerHTML property of the existing DOM element to insert the result of the ajax request. That is why the script tags are not executed. Read carefully the following topic Can scripts be inserted with innerHTML? and modify the script correspondingly.

For example, like this.. insert in the tinybox.js eval(c); after b.innerHTML=c; parts. Or you can follow other recommendations given by the link above.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM