View Full Version : Embedded html Code Doesn't Work
azanna
06-29-2006, 06:31 PM
I'm going blind from staring at this block of code for two days. Outside of FrontPage (2003), this code produces a great looking menu bar with submenus. Once I insert the code into FP, I get only a black bar. I have done a character-by-character comparison and can find no difference in the html. I've copied and pasted and one works and the other doesn't! I've inserted it into FP using the Insert Component, Advanced, HTML command from the menu. Any suggestions???
onlyme
06-30-2006, 01:56 AM
Hello
unless we can see it we cant help? Only thing I can think of is do you need to have an external .js file in your folder at all.
azanna
06-30-2006, 01:06 PM
The code is pretty brief and yes, I have the supporting files (sftmp1arrays.js, sfmenutmp1opera.js, sfmenutmp1ie.js, sfmenutmp1ns4.js, and sfmenutmp1ns.js) in the same, exact location as this file. Here's the block of code. Of course, I strip off the <html>, <head> and <body> tags when I put it in FP...
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<script language="javascript" src="c:\chsrc\scriptforest\sftmp1arrays.js">
</script>
<script language="javascript">
var HOPBn=false;uagent = window.navigator.userAgent.toLowerCase();
HOPBn=(uagent.indexOf('opera') != -1)?true:false
if(document.all)
{
if(HOPBn==true)
{
<script language="javascript" src="c:\chsrc\scriptforest\sfmenutmp1opera.js">
</script>
<div id="tmp1hmplcmenu1" style="position:relative;width:402px;height:50px;backgrou nd:#000000;padding:0px;overflow:hidden;border-width:0px;">
</div>
}
else
{
<script language="javascript" src="c:\chsrc\scriptforest\sfmenutmp1ie.js">
</script>
<div id="tmp1hmplcmenu1" style="position:relative;width:402px;height:50px;backgrou nd:#000000;padding:0px;overflow:hidden;border-width:0px;">
</div>
}
}
else
{
if(document.layers)
{
<script language="javascript" src="c:\chsrc\scriptforest\sfmenutmp1ns4.js">
</script>
<table>
<tr>
<td width=402>
<ilayer id="tmp1hmplcmenu1" width=402 height=0 bgcolor="#808080">
</ilayer>
</td>
</tr>
</table>
}
else
{
<script language="javascript" src="c:\chsrc\scriptforest\sfmenutmp1ns.js">
</script>
}
}
</script>
</td>
</tr>
</table>
It works PERFECTLY until I put it in FP!!!
onlyme
06-30-2006, 02:19 PM
<script language="javascript" src="c:\chsrc\scriptforest\sftmp1arrays.js">
that should show the relative link, not still point to your hard drive. So it should look something like
<script language="javascript" src="sftmp1arrays.js">
But becuase you say "It works PERFECTLY until I put it in FP!!!" this is why we need to see it in FP .. the published page.
vBulletin® v3.8.1, Copyright ©2000-2010, Jelsoft Enterprises Ltd.