Solved

Why is IE6 doing this with my script?

Posted on 2002-06-12
16
309 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
  • 8
  • 7
16 Comments
 
LVL 23

Expert Comment

by:b1xml2
Comment Utility
set the following in your scripts

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

Author Comment

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

Author Comment

by:wec012299
Comment Utility
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
 
LVL 23

Expert Comment

by:b1xml2
Comment Utility
show us your script please
0
 
LVL 23

Expert Comment

by:b1xml2
Comment Utility
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
Comment Utility
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
Comment Utility
so where is the funny E with the caret appearing?
0
 
LVL 1

Author Comment

by:wec012299
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 1

Author Comment

by:wec012299
Comment Utility
www.homeestyle.com

see for youself
0
 
LVL 23

Expert Comment

by:b1xml2
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
www.homeestyle.com

see for youself
0
 
LVL 23

Expert Comment

by:b1xml2
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now