473,231 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Java Script Error in HTML Page

112 100+
I have a page, Head tag Contains many Scripts and style sheet for Menu and Page. This code working fine and displaying menus and page as i wanted.

Check this page for reference.
http://www.marco.com.cn/web-content/marco_re10.html

--------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. <head>
  2. <!-- InstanceBeginEditable name="doctitle" -->
  3. <title>Marco</title>
  4. <!-- InstanceEndEditable -->
  5. <!-- InstanceBeginEditable name="head" -->
  6. <link href="../../web-content-Backup/extra.css" rel="stylesheet" type="text/css">
  7. <!-- InstanceEndEditable -->
  8. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  9. <script type="text/javascript" src="js/jquery.js"></script>
  10. <script type="text/javascript" src="js/jquery.dimensions.pack.js"></script>
  11. <script type="text/javascript" src="js/marco.js"></script>
  12. <link href="extra.css" rel="stylesheet" type="text/css"/>
  13. <link rel="stylesheet" type="text/css" href="marco.css"/>
  14. <script type="text/javascript">
  15. <!--
  16. function openMenu(a){
  17.     var td = $(a).parents("td")[0];
  18.     var menus = ["menu1", "menu2", "menu3", "menu4", "menu5", "menu6", "menu7", "menu8"];
  19.     var myName = $(td).id();
  20.     for(var i=0;i<menus.length;i++)
  21.         if(menus[i] != myName)
  22.             hideMenu($("#" + menus[i]));
  23.     toggleMenu(td);
  24. }
  25. // -->
  26. </script></head>
  27.  
-------------------------------------------------------
But if i include another set of java scripts for image popup My right side menu is not displaying.
Here is my full page code including image popup javascript(lightbox.js).

[HTML]<html><!-- InstanceBegin template="Templates/MainTemplate.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Marco</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="../../web-content-Backup/extra.css" rel="stylesheet" type="text/css">
<!-- InstanceEndEditable -->
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.dimensions.pack.js"></script>
<script type="text/javascript" src="js/marco.js"></script>
<link href="extra.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="marco.css"/>
<script type="text/javascript">
<!--
function openMenu(a){
var td = $(a).parents("td")[0];
var menus = ["menu1", "menu2", "menu3", "menu4", "menu5", "menu6", "menu7", "menu8"];
var myName = $(td).id();
for(var i=0;i<menus.length;i++)
if(menus[i] != myName)
hideMenu($("#" + menus[i]));
toggleMenu(td);
}
// -->
</script>


<link rel="stylesheet" href="backbox.css" type="text/css" />
<script type="text/javascript" src="js/prototype.compressed.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript" src="js/dhtmlHistory.js"></script>
<script type="text/javascript" src="js/customsignsheader.js"></script>


</head>
<body>
<div align="center"><IMG height=70 alt="" src="images/Home_01.jpg" width=800></div><table align="center" cellpadding="0" cellspacing="0" border="0" width="800" style="BACKGROUND-COLOR: white">
<tr>
<td><A onmouseover="changeImages('home','images/home-on.gif');return true" onmouseout="changeImages('home','images/home.gif');return true" href="index.html"><IMG id=home height=24 alt="" src="images/home.gif" width=53 border=0 name=home></a><IMG height=23 alt="" src="../../web-content-Backup/images/split.gif" width=8 border=0><A onmouseover="changeImages('news','images/news-on.gif');return true" onmouseout="changeImages('news','images/news.gif');return true" href="News.html"><IMG id=news height=24 alt="" src="../../web-content-Backup/images/news.gif" width=53 border=0 name=news></a><IMG height=23 alt="" src="../../web-content-Backup/images/split.gif" width=8 border=0><!--<a onmouseover="changeImages('products','images/products-on.gif');return true" onmouseout="changeImages('products','images/products.gif');return true" href="Products.html"><img id="products" src="images/products.gif" alt="" name="products" border="0" height="24" width="91"></a><img src="images/split.gif" alt="" border="0" height="23" width="8">--><A onmouseover="changeImages('company','images/company-on.gif');return true" onmouseout="changeImages('company','images/company.gif');return true" href="Company.html"><IMG id=company height=24 alt="" src="../../web-content-Backup/images/company.gif" width=83 border=0 name=company></a><IMG height=23 alt="" src="../../web-content-Backup/images/split.gif" width=8 border=0><A onmouseover="changeImages('careers','images/careers-on.gif');return true" onmouseout="changeImages('careers','images/careers.gif');return true" href="Careers.html"><IMG id=careers height=24 alt="" src="../../web-content-Backup/images/careers.gif" width=79 border=0 name=careers></a><IMG height=23 alt="" src="../../web-content-Backup/images/split.gif" width=8 border=0><A onmouseover="changeImages('contact','images/contact-on.gif');return true" onmouseout="changeImages('contact','images/contact.gif');return true" href="Contact.html"><IMG id=contact height=24 alt="" src="../../web-content-Backup/images/contact.gif" width=81 border=0 name=contact></a></td></tr></table>
<table id="mainbar" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="15"></td>
<td width="621" style="PADDING-LEFT: 0px; VERTICAL-ALIGN: top; PADDING-TOP: 0px; BACKGROUND-COLOR: white"><!-- InstanceBeginEditable name="Content" -->
<IMG height=133 alt=Griprite src="images/renoirwebpicture.jpg" width=623><br>
<div class="text">
<p>&nbsp;<img border="0" src="images/renoirwebpic1.JPG" width="83" height="30">&nbsp;<span class="text"><font size="1"><b>fine
art</b></font> </span><font face="MyriadPro-Regular" color="#8d8d8d" size="1">is
a beautifully designed range of high quality products for drawing,
sketching and</font> <font face="Myriad-Roman" color="#8d8d8d" size="1">hobby
purposes. The range is used by artists, designers and illustrators&nbsp;&nbsp;as
well as for hobby purposes. The range meets all the high
requirements one would expect from pencils designed for
professionals, such as subtle sense of color, good color transfer</font>
<font face="Myriad-Roman" color="#8d8d8d" size="1">and fine color
texture. With excellent mixing qualities and a very well coordinated
range of colors and degrees of hardness, they provide even more
possibilities to express oneself.</font></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
<table width="616">
<tbody>
<tr>
<td width="608"><img border="0" src="images/graphitesingle.jpg" width="606" height="83"></td>
</tr>
<tr>
<td width="608">
<table width="607">
<tbody>
<tr>
<td width="361">&nbsp;
<img border="0" src="images/12%20graph%2002.jpg" width="250" height="321">
<div onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()">
<a href="images/12%20graph%2001.jpg" rel="lightbox[slide]" caption="RenoirGraphite">
<img src="images/3%20graphite.jpg" alt="lime" width="346" height="132" border="0" /></a>
</div>
<a href="images/12%20graph%2002.jpg" rel="lightbox[slide]" caption="RenoirGraphite"></a>
<a href="images/big%20graphite%201.jpg" rel="lightbox[slide]" caption="RenoirGraphite"></a>

</td>
<td width="232" style="VERTICAL-ALIGN: top"><span class="text">
Detail :
</span>
<p><span class="text">
2H-8B Artist Graphite<br>
Round Cedar-lite Wood<br>
Dipped w/Band<br>
Sharpened<br>
Fine Art Box or Individual grade 6x2 Cardboard Box<br>
<br>
Item numbers :<br>
</span>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
[/HTML]

[HTML] <table>
<tbody>
<tr>
<td><img border="0" src="images/aquarellesingle.jpg" width="609" height="92"></td>
</tr>
<tr>
<td>
<table width="604">
<tbody>
<tr>
<td width="348">

</td>
<td style="VERTICAL-ALIGN: top" width="242"><span class="text">Detail
:&nbsp;
</span>
<p><span class="text">Available in 12/24/48 Colors<br>
3.7mm Fine Art Aquarelle Color lead<br>
Round Cedar-lite Wood<br>
Dipped w/Band<br>
Sharpened<br>
Fine Art Box or Individual color 6x2
Cardboard Box<br>
<br>
Item numbers :&nbsp;<br>
</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

<p>
<a href="images/24%20Aqua%2002.jpg" rel="lightbox[slide]" caption="RenoirAquarelle-24">
<img src="images/5-aqua.jpg" alt="lime" width="577" height="134" border="0" /></a>
<p><IMG alt="" src="images/24%20Aqua%2001.jpg" width="250" height="320"></p>
<div onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()">
&nbsp;
</div>
<a href="images/big%20aqua%201.jpg" rel="lightbox[slide]" caption="RenoirAquarelle"></a>
<a href="images/big%20aqua%2012%2002.jpg" rel="lightbox[slide]" caption="RenoirAquarelle-12"></a>
<a href="images/big%20aqua%2024%2001.jpg" rel="lightbox[slide]" caption="RenoirAquarelle-24"></a>
<a href="images/big%20aq%2048%2003.jpg" rel="lightbox[slide]" caption="RenoirAquarelle-48"></a>
<a href="images/big%20aq%2003.jpg" rel="lightbox[slide]" caption="RenoirAquarelle-48"></a>

<table>
<tbody>
<tr>
<td><img border="0" src="images/coloursingle.jpg" width="613" height="71"></td>
</tr>
<tr>
<td>
<table width="613" cellspacing="1">
<tbody>
<tr>
<td width="320">
<p><img border="0" src="images/big%20color%2024%2003.jpg" width="350" height="372"></p>

<div onclick="dhtmlHistory.add('location1',{message: 'backbox'});countdown()">
<a href="images/big%20color%2024%2002.jpg" rel="lightbox[slide]" caption="RenoirColor-24">
<img src="images/big%20color%2024%2002.jpg" alt="lime" width="95" height="93" border="0" /></a>
</div>
<a href="big%20color%2024%2003" rel="lightbox[slide]" caption="RenoirColor"></a>


</td>
<td style="VERTICAL-ALIGN: top" width="279">
<p style="line-height: 100%"><span class="text">Detail
:&nbsp;
</span></p>
<p style="line-height: 100%"><span class="text">Available in 12/24/48 Colors<br>
3.7mm Fine Art Color lead<br>
Round Cedar-lite Wood<br>
Dipped w/Band<br>
Sharpened<br>
Fine Art Box or Individual color 6x2
Cardboard Box<br>
<br>
Item numbers :<br>
</span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

<!-- InstanceEndEditable --></td>
<td width="14">
<td width="138" style="VERTICAL-ALIGN: top"><table id="menubar" border="0" cellpadding="0" cellspacing="0" style="BACKGROUND-COLOR: #2a2b7a">
<tr>
<td><IMG height=36 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu1" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -60px; WIDTH: 60px"><A href="Colorite.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_04.gif" width=46></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_03.gif" width=138></td>
</tr>
<tr>
<td><IMG height=4 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu2" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -150px; WIDTH: 150px"><A href="Superb.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_11.gif" width=77></a><A href="Griprite.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_13.gif" width=46></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_06.gif" width=138></td>
</tr>
<tr>
<td><IMG height=4 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu3" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -110px; WIDTH: 110px"><A href="Neon.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_19.gif" width=33></a><A href="Metallic.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_21.gif" width=46></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_08.gif" width=138></td>
</tr>
<tr>
<td><IMG height=4 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu4" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -110px; WIDTH: 110px"><A href="Axiom.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_27.gif" width=40></a><A href="Natural.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_29.gif" width=43></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_10.gif" width=138></td>
</tr>
<tr>
<td><IMG height=4 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu5" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -55px; WIDTH: 200px"><A href="Raffine.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_35.gif" width=41></a><A href="marco_re.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_42.png" width=116></a></div>
<div></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_12.gif" width=138></td>
</tr>
<tr>
<td><IMG height=4 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu6" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: 0px; WIDTH: 0px"></div><A href="index.html"><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_14.gif" width=138></a></td>
</tr>
<tr>
<td><IMG height=65 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu7" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -150px; WIDTH: 200px"><A href="newproducts.htm"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_40.gif" width=57></a><A href="marco_re.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_42.png"></a></div>
<IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_16.gif" width=138></td>
</tr>
<tr>
<td><IMG height=43 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu8" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -300px; WIDTH: 300px"><A href="Standards.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_48.gif" width=59></a><A href="Packaging.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_50.gif" width=116></a><A href="Test Reports.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_52.gif" width=71></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/NormalPages_18.gif" width=138></td>
</tr>
<tr>
<td><IMG height=36 alt="" src="../../web-content-Backup/images/spacer.gif" width=138></td>
</tr>
<tr>
<td id="menu9" onmouseover="mouseOver(this);"><div class="menu" style="DISPLAY: none; MARGIN-LEFT: -60px; WIDTH: 160px"><A href="Making_Pencils.html"><IMG height=16 alt="" src="../../web-content-Backup/images/Home_451.gif" width=160></a></div><IMG height=16 alt="" src="../../web-content-Backup/images/Normalpages_201.gif" width=160></td>
</tr>
<tr>
<td height="108"></td>
</tr>
</table>
</td>
<td width="14">
</td>
</tr>
<tr>
<td width="15"></td>
<td width="621" height="45"></td>
<td width="14">
<td width="138">
<td width="14"></td>
</tr>
</table>
<script type="text/javascript" src="js/customsignsfooter.js"></script>
</body>
<!-- InstanceEnd --></html>
[/HTML]
-----------------
Everything works fine except the Right side menu. is not displaying.



Thanks
Jul 8 '08 #1
7 3573
acoder
16,027 Expert Mod 8TB
I've moved your thread from the HTML forum since it's a JavaScript problem.

As a full member now, you should know that we expect your code to be posted in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use the tags in future.

MODERATOR.
Jul 8 '08 #2
acoder
16,027 Expert Mod 8TB
Have you checked the error console? I see this error:
Expand|Select|Wrap|Line Numbers
  1. $.browser is undefined
  2. http://www.marco.com.cn/web-content/js/marco.js
  3. Line 42
Jul 8 '08 #3
hsriat
1,654 Expert 1GB
And somewhere in the code you have used mouseOver instead of onmouseover.
Jul 8 '08 #4
imtmub
112 100+
And somewhere in the code you have used mouseOver instead of onmouseover.
No i didnt use mouseover, I have check the whole page. the same i m using for other pages also. Those pages are working. After i added the lightbox.js to this page i am having these problem. (Lightbox.js open a popup window to display a image)

You can check my other page for reference:
http://www.marco.com.cn/web-content/marco_re.html

Thanks
Jul 9 '08 #5
acoder
16,027 Expert Mod 8TB
Lightbox can cause problems. You're already using jquery and Lightbox uses prototype. You can try using noConflict in jquery, or what would probably more sense is to use a lightbox clone written in jQuery. There is one, but I can't recall the name off the top of my head.
Jul 9 '08 #6
imtmub
112 100+
I dont understand really. do u have any other method
Jul 14 '08 #7
acoder
16,027 Expert Mod 8TB
What I'm basically saying is to avoid lightbox and use one of its clones. If you search the plugins for jQuery, you should find some decent ones. There's also one known as ThickBox.
Jul 14 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
0
by: Mircea Pleteriu | last post by:
Hi all, I have created a .NET Windows control with c#. I have placed the control on a HTML page within the OBJECT element. Everything works fine up to now. Now, I wanna implement the...
8
by: Sergei | last post by:
Hi, I am displaying modal dialog and passing values from the main form to the modal dialog and back. It works fine but if I used the following syntax on Page_Load(just for testing) in VB to...
9
by: Stephen H. | last post by:
Hi, I have an existing web application with java beans that I wanne migrate to ASP.NET using C#. The existing web application has some jsp files that use java beans as follows: .... <%@...
8
by: dbaplusplus | last post by:
I worked on web development using java script many many years, so I am now a newbie to javascript. I have a single html page, which is generated dynamically using some programming language. Web...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
3
by: rajarya | last post by:
Hi, I m designing a HTML page(index.html),here i have 2 frames,by defult both frames have index1.html and index2.html as their source . in first frame(index.html) ,i have some redio buttons,and a...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.