babelfish
07-16-2002, 03:38 PM
ok im slowly learning jscript but i dont get this bit:
can someone enlighten me how to do this:
<code>
<script language="JavaScript" type="text/JavaScript">
<!--
function submenu(item)
{
document.write('<div id="\'+item+\'layer" class="dd">');
}
//-->
</script>
<body onLoad="submenu(help);">
</code>
i will basically have quite a few lines of similar code but there will be one word different - and i dont wanna use arrays as this isnt flexible enough for me :)
so how can i get it to output?
thanks!
can someone enlighten me how to do this:
<code>
<script language="JavaScript" type="text/JavaScript">
<!--
function submenu(item)
{
document.write('<div id="\'+item+\'layer" class="dd">');
}
//-->
</script>
<body onLoad="submenu(help);">
</code>
i will basically have quite a few lines of similar code but there will be one word different - and i dont wanna use arrays as this isnt flexible enough for me :)
so how can i get it to output?
thanks!