|
Posted by the DtTvB on 05/28/06 05:48
> The problem is that "write something down" displays on the Internet
> Explorer, but number 1 doesn't. If we call just file.php - it works then -
> it displays both. Why is javascript not executing from ajax called
> procedure?
1. The document.write method can only be called while the page is
loading, if we call it after the page was loaded or with any events,
or with AJAX script, it will replace whole HTML data in IE, and
in Firefox, it will do nothing.
2. If the script tag is created dynamically by changing some
element's innerHTML, it won't be executed.
My way to create script on the fly is using this script
scriptObj =
document.body.appendChild(document.createElement('script'));
scriptObj.type = 'text/javascript';
scriptObj.src = '<link to js file>';
[Back to original message]
|