Problems with "getElementById" on Opera and Mozilla.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alfred_Baudisch
Posted On:   Wednesday, February 4, 2004 11:20 AM

Hello, I'm developing a chat with PHP and JavaScript. In one of the pages, it has the following code: The "js.php" has a javascript timer that checks for new posts, etc.. If needs to do an action, it simple changes the "src" of the element id "test" mentioned above, using this code: document.all.testjs.src='testjs.js'; Well, this works 100% fine on Internet Explorer. But in Opera and Mozilla, it isn't working... I had tried this too: document.getElementById("testjs").src="testjs.js"; And only worked on Internet Explorer too. Please, anybody knows a manner to change the JavaScript inserction like I mentioned on others nav   More>>

Hello,


I'm developing a chat with PHP and JavaScript.


In one of the pages, it has the following code:


The "js.php" has a javascript timer that checks for new posts, etc.. If needs to do an action, it simple changes the "src" of the element id "test" mentioned above, using this code:
document.all.testjs.src='testjs.js';


Well, this works 100% fine on Internet Explorer. But in Opera and Mozilla, it isn't working... I had tried this too:
document.getElementById("testjs").src="testjs.js";


And only worked on Internet Explorer too.
Please, anybody knows a manner to change the JavaScript inserction like I mentioned on others navigators?


Thanks
Alfred R. Baudisch

   <<Less

Re: Problems with "getElementById" on Opera and Mozilla.

Posted By:   Firat_Tiryaki  
Posted On:   Thursday, February 5, 2004 12:06 AM

The important thing is you have an error or not. Maybe it works but your variables have to be refreshed or something else...
About | Sitemap | Contact