schluse
Newbie
Posts: 1
Registered: 1/10/2004
Member Is Offline
|
| posted on 1/10/2004 at 12:22 PM |
|
|
Error loading menu by .createElement
Hello,
I concatenated all the stuff of menu_items.js and menu_tpl.js into the main script menu.js.
When loading it directly, everthing works fine to me.
When loading it by using the following script it fails (message: Object required):
<script type="text/javascript">
<!--
var oScript = document.createElement('script');
oScript.language = 'JavaScript';
oScript.type = 'text/javascript';
oScript.src = 'http://mysite.net/menu/menu.js';
document.body.appendChild(oScript);
//-->
</script>
Any suggestions?
|
|
|
tigra
Administrator
Posts: 1912
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 1/12/2004 at 07:09 AM |
|
|
I think it will not work this way. To make sure try the same approach with any other script that generates HTML code with document.write function.
|
|
|