Is there a simple way to include javascript code with HTML in a string (read from a database and returned via AJAX-type request) that is assigned to a div's innerHTML property and have the javascript evaluated?
Currently I'm using regular expression to parse out the javascript part and eval'ing it separately, but this is cumbersome at best.
Tracy Dryden
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.![[dragon] [dragon] [dragon]](/data/assets/smilies/dragon.gif)
Currently I'm using regular expression to parse out the javascript part and eval'ing it separately, but this is cumbersome at best.
Tracy Dryden
Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
![[dragon] [dragon] [dragon]](/data/assets/smilies/dragon.gif)