|
|
| Using firefox, I am including a javascript file using the DOM, and when it gets included, the page goes blank and it says its trying to read from the server where the js file is located -- anyone know why it would be doing this? It works fine in IE |
| Poolkop, How are you including it? |
| Var js = document.createElement('script'); document.getElementById('test').appendChild(js); And there is a <div id="test"></div> at the bottom of the page |
| Hmz, i'm not sure if that's allowed |
| Poolkop, You should append it to the document, not to a div. |
| I think innerHTML is the only way to do it in FF |
| plantino, Are you sure? I've got it working fine in firefox with DOM methods. |
| Roombor, document.appendChild()? |
| Use ajax to grab the file's source then eval() it That's what i've done in the past |
| Http://www.webreference.com/programming/ajax_tech/ It turns out to be document.body.appendChild . My mistake. I've only tested this running locally. But it worked fine in firefox when I did. |
| Hm, ok Kopilman, do you have an example of code that uses ajax for this? that works in IE/FF? |