While playing with some really slick asynchronous javascript stuff (no - not Ajax, there wasn't any XML involved), I ran into an odd behavior that varied between the several browsers.
What I'm doing is passing back a table from an asynchronous call and placing it into a premade table elementId. The page supports interaction with either javascript, if enabled, or straight href links if javascript is not enabled.
The problem occurs when my Async call returns a table with a
Replace innerHTML with innerText and Safari renders the entire script source, Firefox & Camino ignore it.
Hrm - so how to dynamically fill in script into the DOM of a page and have it executed?
The DOM inspector in Firefox correctly shows the Javascript being part of the element, but since the parser has already gone through that element, evaluated the Javascript later in the page, then it doesn't seem to be re-executed.
Update
It seems as though there is promise in the eval
function of Javascript. However, nothing seems apparent yet.