You are here: Re: ajax & php & javascript « PHP Programming Language « IT news, forums, messages
Re: ajax & php & javascript

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>';

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация