Solved

Newbie needs help with code for Show/Hide Layers

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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

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 498
unable to connect to host / dreamweaver cs3 11 173
Element Positioning for Fluid Grid Layout 6 196
Dreamweaver server behavior gone 6 189
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…
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 …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

734 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