Solved

Newbie needs help with code for Show/Hide Layers

Posted on 2002-07-06
3
198 Views
Last Modified: 2012-05-04
I have created a page in the the  evaluation version of Dreamweaver MX. The page has a layer of text that shows two two other layers onmouserover, and hides the other two layers onmouseout. When viewed in IE 6.2, it appears to work as intended, but generates the following error message:

Line: 158
Char: 1
Error: Object Expected
Code: 0

Here is the Dreamweaver generated code assocoiated with the error message:

158 <div id="Text6" class="Main2" onMouseOver="return Text6_onMouseOver()" onMouseOut="return Text6_onMouseOut()"><font color="#444444" size="1" face="Arial, Helvetica, sans-serif">

159    <font size="2">H</font>EALTH <font size="2">C</font>ARE <font size="2">B</font>UYER</font></div>

Since I know nothing about code, I don't see anything wrong with it. The URL for the page is:
www.stonepcworks.com/vitality1.asp

All help is appreciated. Thanks, Bill
0
Comment
Question by:westone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
joyriderank earned 100 total points
ID: 7138547
hi westone,

I have checked the code and corresponding page. Everything else seems to be fine but the initial div tag in the beginning of the font tag is extra. If you remove it everything works fine. Instead of it being what it is that is:

157 : <div id="Layer6" style="position:absolute; width:163px; height:16px; z-index:7; left: 10px; top: 320px;" onMouseOver="MM_showHideLayers('Layer12','','show','Layer13','','show')" onMouseOut="MM_showHideLayers('Layer12','','hide','Layer13','','hide')" class="Main2">
158 : <div id="Text6" class="Main2" onMouseOver="return Text6_onMouseOver()" onMouseOut="return Text6_onMouseOut()"><font color="#444444" size="1" face="Arial, Helvetica, sans-serif">
159 : <font size="2">H</font>EALTH <font size="2">C</font>ARE <font size="2">B</font>UYER</font></div>
160 : </div>

just remove the code as I have and everything will work fine. Here is how the code looks like after removing the extra code.

157 : <div id="Layer6" style="position:absolute; width:163px; height:16px; z-index:7; left: 10px; top: 320px;" onMouseOver="MM_showHideLayers('Layer12','','show','Layer13','','show')" onMouseOut="MM_showHideLayers('Layer12','','hide','Layer13','','hide')" class="Main2">
158 : <font color="#444444" size="1" face="Arial, Helvetica, sans-serif">
159 : <font size="2">H</font>EALTH <font size="2">C</font>ARE <font size="2">B</font>UYER</font>
160 : </div>

Similarly if you would remoe the extra <DIV> tag from in front of the text or font tag the error will disappear.

Hope this solves your problem.

TAKE CARE.

Joyriderank. :):):)
0
 

Author Comment

by:westone
ID: 7139332
Thank you very much! Dreamweaver generated all the code and I was clueless about the problem. Removing that extra stuff eliminated the error. Thanks again!
0
 
LVL 1

Expert Comment

by:joyriderank
ID: 7139661
You are most welcome.

Dreamweaver many times does that. With more and more experience you will be able to decide which is necesary and which is not. Actually having knowledge of Javascript will also help you decide which code to keep and which code to do away with.

Chalo that will be all for now. TAKE CARE.

Joyriderank.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question