Solved

Newbie needs help with code for Show/Hide Layers

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Dreamweaver - Spell check extension 4 489
submit button form code 2 433
Dreamweaver CC no database behaviors or connections possible ? 10 4,151
Dreamweaver CS4 filling forms 2 147
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…
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 …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

809 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