Board Logo

Error loading menu by .createElement
schluse - 1/10/2004 at 12:22 PM

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 - 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.


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/