Solved

Newbie needs help with code for Show/Hide Layers

Posted on 2002-07-06
3
175 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
  • 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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