Solved

Why is IE6 doing this with my script?

Posted on 2002-06-12
16
315 Views
Last Modified: 2012-06-27
I'm testing the web site I'm working on with various browser versions.  IE 5 for Mac, NS 4 & 6 for Mac,
NS 4 for Windows and finally IE 6 for Windows.  This is where I run into a problem, IE 6 for Windows.
 In my javascript menu, using IE 6, an "E" with one of these (^) is generated at the beginning of both
my menu items and submenu items.  I don't understand.  I can only attribute this to how IE 6 is handling
the script.  Hoping someone can give me an answer and a cure.  Thanks.
0
Comment
Question by:wec012299
[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
  • 8
  • 7
16 Comments
 
LVL 23

Expert Comment

by:b1xml2
ID: 7074003
set the following in your scripts

document.charSet = "iso-8859-1";
0
 
LVL 1

Author Comment

by:wec012299
ID: 7074053
Is it that easy?  I'll give it a try.
0
 
LVL 1

Author Comment

by:wec012299
ID: 7074105
Is there a specific spot where this needs to be inserted?  I added it right after the script tag and it won't do the trick.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 23

Expert Comment

by:b1xml2
ID: 7075576
show us your script please
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7075585
remember that you can override the encoding settings meant for a page via View--->Encoding and you will see pretty weird characters.
0
 
LVL 1

Author Comment

by:wec012299
ID: 7075780
the encoding option did not work.

Here's the script:

<script language="JavaScript" src="navcond.js"></script>

<script language="JavaScript">

var myNavBar1 = new NavBar(0);

var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub
category width in pixels)

//add more menus simply by adding more "blocks" of same code below



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Home", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("News", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Tips", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Great New Sites", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Contributors", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Thermador", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Vermont Soapstone", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Warm Rails", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Select Comfort", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Services", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Web Hosting", ""));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Contact Us", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Production", "mailto:production@abc.com?subject=RE: Production
Inquiry..."));

dhtmlMenu.addItem(new NavBarMenuItem("Info", "mailto:info@abc.com?subject=RE: Info Request..."));

dhtmlMenu.addItem(new NavBarMenuItem("New Contributor Submissions", "mailto:submission@abc.com?subject=RE:
Product Submission..."));

myNavBar1.addMenu(dhtmlMenu);



//set menu colors

myNavBar1.setColors("#000000", "#000000", "#C0C0C0", "#ffffff", "#66CC99", "#000000", "#cccccc", "#ffffff",
"#0099CC")



//uncomment below line to center the menu (valid values are "left", "center", and "right"

myNavBar1.setAlign("center")

var fullWidth;

function init() {

 // Get width of window, need to account for scrollbar width in Netscape.



 fullWidth = getWindowWidth()

   - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);



 myNavBar1.resize(fullWidth);

 myNavBar1.create();

 myNavBar1.setzIndex(2);

 //UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels

myNavBar1.moveTo(0, 100);

}

</script>
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7075809
so where is the funny E with the caret appearing?
0
 
LVL 1

Author Comment

by:wec012299
ID: 7075822
the encoding option did not work.

Here's the script:

<script language="JavaScript" src="navcond.js"></script>

<script language="JavaScript">

var myNavBar1 = new NavBar(0);

var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub
category width in pixels)

//add more menus simply by adding more "blocks" of same code below



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Home", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("News", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Tips", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Great New Sites", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Contributors", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Thermador", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Vermont Soapstone", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Warm Rails", "http://www.abc.com"));

dhtmlMenu.addItem(new NavBarMenuItem("Select Comfort", "http://www.abc.com"));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Services", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Web Hosting", ""));

myNavBar1.addMenu(dhtmlMenu);



dhtmlMenu = new NavBarMenu(200, 100);

dhtmlMenu.addItem(new NavBarMenuItem("Contact Us", ""));

dhtmlMenu.addItem(new NavBarMenuItem("Production", "mailto:production@abc.com?subject=RE: Production
Inquiry..."));

dhtmlMenu.addItem(new NavBarMenuItem("Info", "mailto:info@abc.com?subject=RE: Info Request..."));

dhtmlMenu.addItem(new NavBarMenuItem("New Contributor Submissions", "mailto:submission@abc.com?subject=RE:
Product Submission..."));

myNavBar1.addMenu(dhtmlMenu);



//set menu colors

myNavBar1.setColors("#000000", "#000000", "#C0C0C0", "#ffffff", "#66CC99", "#000000", "#cccccc", "#ffffff",
"#0099CC")



//uncomment below line to center the menu (valid values are "left", "center", and "right"

myNavBar1.setAlign("center")

var fullWidth;

function init() {

 // Get width of window, need to account for scrollbar width in Netscape.



 fullWidth = getWindowWidth()

   - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);



 myNavBar1.resize(fullWidth);

 myNavBar1.create();

 myNavBar1.setzIndex(2);

 //UNCOMMENT BELOW LINE TO MOVE MENU DOWN 50 pixels

myNavBar1.moveTo(0, 100);

}

</script>
0
 
LVL 1

Author Comment

by:wec012299
ID: 7075833
www.homeestyle.com

see for youself
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7075918
breaking up the code as we speak. Hopefully, we can get to the bottom of things!!!
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 100 total points
ID: 7075940
the character is in your javascript file:

if(isMinIE6)str+='<table cellspacing=0 width="100%" height="100%"><tr><td>Ê</td></tr></table>';

remove that.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7075962
also, while NS 6.2 can't load the menu, it can load your navcond.js and it sees the Ê in your script. That's why you are seeing the Ê. Nothing to do with MSIE.
0
 
LVL 1

Author Comment

by:wec012299
ID: 7075980
www.homeestyle.com

see for youself
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7076001
i have seen it wec, it is the character, must be the encoding when you saved the page, but it is there with Opera 6, NS 6, MSIE 6 so it is the script and not the browsers...
0
 
LVL 1

Author Comment

by:wec012299
ID: 7076382
Thanks b1xml2.  That was it.  I'm not sure how that happened.  The E only showed up in IE6, so I assumed it had something to do with the browser.  My only explanation is that at some point I think I viewed the script with NS composer which seems to sometimes alter code for some reason.  In addition, I only checked the script within my index page.  I should have dug deeper.  Thanks for all of your help.
0
 

Expert Comment

by:danielle-d-avout
ID: 7609484
you are rendering bad html and Explorer will not tolerate it anymore
IE6 will not allow in some cases bad entities no more naked & but a clean &amp;
no more subject=something
a clean subject='something' and you are safe
for example
the  URL is may be not W3C compliant
have a look on http://validator.w3.org/docs/errors.html#bad-entity
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

Suggested Solutions

Title # Comments Views Activity
Put POST values into cookies. 14 51
setInterval() calls function twice in one interval 2 49
Slush on text 2 22
Dropdown animation to normal dropdown 6 23
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

738 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