| View previous topic :: View next topic |
| Author |
Message |
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
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 |
| |
|
|
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Poolkop, How are you including it? |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
Var js = document.createElement('script'); document.getElementById('test').appendChild(js);
And there is a <div id="test"></div> at the bottom of the page |
| |
|
|
Ikopar
Joined: 26 May 2006 Posts: 168
|
| Hmz, i'm not sure if that's allowed |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
| Poolkop, You should append it to the document, not to a div. |
| |
|
|
plantino
Joined: 13 May 2006 Posts: 96
|
| I think innerHTML is the only way to do it in FF |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
|
plantino, Are you sure?
I've got it working fine in firefox with DOM methods. |
| |
|
|
Poolkop
Joined: 01 Jun 2006 Posts: 123
|
| Roombor, document.appendChild()? |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
Use ajax to grab the file's source then eval() it
That's what i've done in the past |
| |
|
|
Roombor
Joined: 02 Jun 2006 Posts: 111
| |
| Page 1 of 2 |
Goto page 1, 2 Next |
|