I am having difficulty embedding the dhtml menu inside a cell (<td>) which is inside another cell. The following page which has the menu, needs to be called as an include from the main page.
Here is the url:
http://www.cair-net.org/includes/topnav ... mlexpt.asp
Also, the following code always break the website by giving the following error:
<script type="text/javascript">
if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");
else _d.write("<script language=JavaScript src=mmenudom.js><\/script>");
</script>
Error Type:
Active Server Pages, ASP 0138 (0x80004005)
A script block cannot be placed inside another script block.
/includes/topnavigation.asp, line 4
Please help.
Embedding the dhtml code inside a table cell
-
- Beginner
- Posts: 3
- Joined: Wed Nov 03, 2004 7:21 pm
Re: Embedding the dhtml code inside a table cell
Hi,
You should also update your menu code. You are using v5.04, but v5.51 is the current release. There have been many fixes and enhancements since v5.04.
Hope that helps,
Kevin
I'm a little unclear as to what kind of difficulty you're having. Can you be more specific please? What isn't working?naveedarif wrote:I am having difficulty embedding the dhtml menu inside a cell (<td>) which is inside another cell. The following page which has the menu, needs to be called as an include from the main page.
See this post for a solution.Also, the following code always break the website by giving the following error:
<script type="text/javascript">
if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");
else _d.write("<script language=JavaScript src=mmenudom.js><\/script>");
</script>
Error Type:
Active Server Pages, ASP 0138 (0x80004005)
A script block cannot be placed inside another script block.
/includes/topnavigation.asp, line 4
You should also update your menu code. You are using v5.04, but v5.51 is the current release. There have been many fixes and enhancements since v5.04.
Hope that helps,
Kevin
Is it because you are not hiding the script such as
<!--
-->
I don't see body tags on your example, if its xhtml you might need to use CDATA, should be an example in begginers section. To be sure you could validate the html and see what occurs.
However, I realize that includes can be tricky depending up your set up.
Maybe you need to include scripts directly, like include=script path. I've had includes that wouldn't work unless I wrote them as @include=
This may be a bit out of my scope.
maz
<!--
-->
I don't see body tags on your example, if its xhtml you might need to use CDATA, should be an example in begginers section. To be sure you could validate the html and see what occurs.
However, I realize that includes can be tricky depending up your set up.
Maybe you need to include scripts directly, like include=script path. I've had includes that wouldn't work unless I wrote them as @include=
This may be a bit out of my scope.
maz
-
- Beginner
- Posts: 3
- Joined: Wed Nov 03, 2004 7:21 pm
Thanks...However, still searching for the answer...
Hi, thanks for your responses.
If I use the following code (with all the commenting etc), the menu does not appear in any web browswer:
<script type="text/javascript">
<!--
if(ns4)_d.write("<SCR"+"IPT LANGUAGE=JavaScript SRC=mmenuns4.js><\/SCR"+"IPT>");
else _d.write("<SCR"+"IPT LANGUAGE=JavaScript SRC=mmenudom.js><\/SCR"+"IPT>");
-->
Also, this 'topnavigation.asp' file really is just an include file to be called from the main page. That is why there are no body tags in this asp file. Why I put the references for the .js files in this one was in order to atleast test it since putting these references in the <head> or <body> tags in the main page and then calling include file was not working either.
If I use the following code (with all the commenting etc), the menu does not appear in any web browswer:
<script type="text/javascript">
<!--
if(ns4)_d.write("<SCR"+"IPT LANGUAGE=JavaScript SRC=mmenuns4.js><\/SCR"+"IPT>");
else _d.write("<SCR"+"IPT LANGUAGE=JavaScript SRC=mmenudom.js><\/SCR"+"IPT>");
-->
Also, this 'topnavigation.asp' file really is just an include file to be called from the main page. That is why there are no body tags in this asp file. Why I put the references for the .js files in this one was in order to atleast test it since putting these references in the <head> or <body> tags in the main page and then calling include file was not working either.
Here is a working example using the same code to load the menu scripts in an .asp page. The exact code used to load the menu scripts on that page is:
This works for me. The only thing I might suggest is removing the comment tags, although I don't know why that would be a problem.
What browsers are you trying your page in? Can you post the .asp code for your test page (put it inside of BBCode "code" tags)?
Kevin
Code: Select all
<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript">
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
-->
</script>
<script type="text/javascript" src="menu_data.js"></script>
What browsers are you trying your page in? Can you post the .asp code for your test page (put it inside of BBCode "code" tags)?
Kevin