1) Script Title: Simple Tree Menu
Author: Dynamic Drive
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate1.htm
3) Describe problem: Getting Javascript errors or browser errors
..........................................................
Hello,
I have some questions, please help.
Problem 1 (Javascript syntax problem):
.........................................................
If you execute my webpage named page1, page2, page3, page4.htm, you will see that there is an browser error sign at internet explorer and at fire fox explorer bar. If I open the java script console of web development ( of tool menu ) at firefox, I get the following errors:
Warning: Non-standard Global Element reference was used. Use W3C standard document.getElementById() instead.
Source File: file:///C:/Documents%20and%20Settings/snajreen/Desktop/template/Templates/page4.htm
Line: 87
Warning: Non-standard Global Element reference was used. Use W3C standard document.getElementById() instead.
Source File: file:///C:/Documents%20and%20Settings/snajreen/Desktop/template/Templates/page4.htm
Line: 88
............etc..all complains are about these lines.
These are complaints about these following lines at the htm file:
if (full=="page4.htm")
{
page4.style.color="red"
page4.style.border="1px solid #eeeeee"
page4.style.fontWeight="bold"
page4.style.fontSize="15pt"
}, here the browser checks whether the current page is active, and if it were active, it makes the link to be appeared as red.
What is wrong in these lines? The page displays properly, but there is a browser error sign.
Problem 2( browser DOCTYPE Declaration Problem?):
...............................................................................
Another very important question about DOCTYPE.
I think my DOC type declaration at the very beginning of the htm file is wrong.
What it should be?
Should it be--
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
or
<!DOCTYPE XHTML PUBLIC "-//W3C//DTD XHTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
or
no DOCTYPE declaration
or
should it be
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
but if I declare my doctype, I cannot get the affect of the red active link at mozilla.
I am giving the zip folder so that you can unzip and see the codes and error signs.
Please help me to fix these browser error problems and the java error problems. Please respond.
Thank you.



Reply With Quote
. 
Bookmarks