scripting error
Need some help.. am using a javascript menu... on all my customers sites... on each and everyone.. there is a "scripting error" in IE... not sure about netscape... all pages load just fine.. but at bottom left of browser window.. is "done but with error".. if you click that on.. it tells you the line and charactor.. problem is... most of the time...there is nothing on that line.. or... it is a standard heading code such as and ... no any one time.. is it a line that has javascript on it.. have done some research.. and I see.. that on each page.. I need a "dda" file.. well there is one on each page.. but I still get the error. It don't really bother me that much.. cuz the pages still load.. but have new customer and it bugs her... any help would be appreciated.. the test site is voiceone.net/utilibiz thanx in advance...
Suzanne posted this at 22:53 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
1. validate your code -- you have a table in the head tag!
2. http://javascript.internet.com/messages/text-highlighter.html is the problem, it has the same error.
3. Error: document.a has no properties
Source File: http://www.voiceone.net/utilibiz/
Line: 85
4. You have other issues besides the JavaScript. As the JavaScript isn't very useful, you should probably just remove it. Also, the errors are endless. Try using Netscape 7 and the JavaScript Console to see the error -- and how constant it is. It will suck up a lot of resources.
5. It's not the menu.
6. &nsbp;!!
voiceone posted this at 22:56 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
I admit .. not very useful.. the javascript. .but client wanted it.. so I did it.. but.. I get that error on other sites too.. was reading about different DDA files at w3d... and was thinking that was the problem.. that the browsers were not knowing what format to encode.. am I way out in left field on this?...
Suzanne posted this at 22:59 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
!? You get the error that the table is in the head element instead of in the body element? What is w3d? What is a DDA file!?
The client wanted a javascript that would highlight the text?
voiceone posted this at 23:00 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
and just checked. .don't see a table in between my head tags. only my meta tags...can you expand please.. thanx in advance
voiceone posted this at 23:01 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
am sorry.. site for validations..ooops.. it is wdg... that is the site
Suzanne posted this at 23:01 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
Also, the text highlighter has the two colours set to the same colour -- it's entirely pointless.
Suzanne posted this at 23:03 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
<!doctype html public "-//w3c//dtd html 3.2//en" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
UtiliBiz Solutions
</title>
<meta name="Description" content="Arachnophilia 4.0">
<meta name="Robots" content="all">
<meta name="Keywords" content="Arachnophilia 4.0">
</head>
<style type="text/css">
body { background-color: white; color:black; font-family: arial, sans-serif; margin-top:0px; margin-bottom:0px; margin-left:0px; margin=right:0pxl}
p {line-height:20px; margin-top: 15px; margin-bottom: 0px; margin-left:25px; margin-right: 0px;}
.first {font-style:normal; font-weight: normal;}
h1 {text-align:center; font-family:arial; color:black;font-size:20px;}
h2, h3{margin-left: -10px; font-family:arial; color:blue; background-color: transparent;}
ul { list-style-type: circle; font-style: normal; font-weight: normal;}
margin-top:0px; margin-left:50px; padding-left:0px; }
li {margin-bottom:0px; left-margin:850px; font:18;}
address { color: #cc0000; background-color: transparent; text-align: center;}
a {color: red; background-color: transparent; }
address a {font-weight: normal; color: yellow; backgournd-color: navy; padding-left: 5px padding-right: 5px;}
</style>
<table width="101%" height="23%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- Row 1 Column 1 -->
<td bgcolor="#dddddd" >
<img src="utilibiz2.gif" alt="">
</td>
<!-- Row 1 Column 2 -->
<td bgcolor="#6699cc" >
      
</td>
<!-- Row 1 Column 3 -->
<td bgcolor="#ffff66" >
      
</td>
<!-- Row 1 Column 4 -->
<td bgcolor="#66cccc">
      
</td>
<!-- Row 1 Column 5 -->
<td background="bg1.gif" width="45%" height="100%" alt="">
<!-- ONE STEP TO INSTALL TEXT HIGHLIGHTER:
1. Copy the coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the BODY of your HTML document -->
<body>
<script LANGUAGE="JavaScript">
<!-- Original: K. Rama Moorthy -->
<!-- Web Site: <a href="http://www.suyambhu.bizhosting.com" class="bb-url">http://www.suyambhu.bizhosting.com</a> -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! <a href="http://javascript.internet.com" class="bb-url">http://javascript.internet.com</a> -->
<!-- Begin
text = "welcome"; // The text to scroll
color1 = "aqua"; // original text color
color2 = "aqua"; // new character color
fontsize = "5"; // font size of text
speed = 200; // how fast to rotate to next character
// time is in milliseconds, (i.e. 1000 = 1 second)
i = 0;
if (navigator.appName == "Netscape") {
document.write("<layer id=a visibility=show></layer><br><br><br>");
}
else {
document.write("<div id=a></div>");
}
function changeCharColor() {
if (navigator.appName == "Netscape") {
document.a.document.write("<left><font size =" + fontsize + "><font color=" + color1 + ">");
for (var j = 0; j < text.length; j++) {
if(j == i) {
document.a.document.write("<font color=" + color2 + ">" + text.charAt(i) + "</font>");
}
else {
document.a.document.write(text.charAt(j));
}
}
document.a.document.write('</font></font></left>');
document.a.document.close();
}
if (navigator.appName == "Microsoft Internet Explorer") {
str = "<left><font size=" + fontsize + "><font color=" + color1 + ">";
for (var j = 0; j < text.length; j++) {
if( j == i) {
str += "<font color=" + color2 + ">" + text.charAt(i) + "</font>";
}
else {
str += text.charAt(j);
}
}
str += "</font></font></left>";
a.innerHTML = str;
}
(i == text.length) ? i=0 : i++; // reset after going through all letters
}
setInterval("changeCharColor()", speed);
// End -->
</script>
<!-- Script Size: 1.89 KB -->
</td>
</tr>
</table>
<table width="101%" bgcolor="#990033" border="0" cellspacing="1" cellpadding="0">
<tr>
<td align="center">
</td>
</tr>
</table>
<script>
<script type='text/javascript'>
//HV Menu- by Ger Versluis (<a href="http://www.burmees.nl/" class="bb-url">http://www.burmees.nl/</a>)
//Submitted to Dynamic Drive (<a href="http://www.dynamicdrive.com" class="bb-url">http://www.dynamicdrive.com</a>)
//Visit <a href="http://www.dynamicdrive.com" class="bb-url">http://www.dynamicdrive.com</a> for this script and more
function Go(){return}
</script>
<script type='text/javascript' src='exmplmenu_var.js'>
</script>
<script type='text/javascript' src='menu_com.js'>
Your browser seems to have java turned off.
</script>
<table width="101%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!-- Row 1 Column 1 -->
<td width="34%" height="100%" background="bg.gif" align="left">
<div style="position: absolute; top:175px; left:65px; width:475px; height:30px">
<script>
/*Current date script credit:
JavaScript Kit (<a href="http://www.javascriptkit.com" class="bb-url">javascriptkit.com</a>)
Over 200+ free scripts here!
*/
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("<small><font color='aqua' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+"</b></font></small>")
</script>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<center>
<font color="black">
Best If Viewed In
</center>
</font>
<center>
<a href="http://www.microsoft.com/downloads/search.asp?"><img src="ie.gif" alt=""></a>
<br>
at 1024x768
</center>
<br>
<br>
<center>
<font color="black" size="1">
Web Site Developed and Hosted by
<a href="http://www.voiceone.net" target="new window" ONCLICK="window.open('http:<a href="http://www.voiceone.net" class="bb-url">voiceone.net</a>','new window',);return false"><br>Voiceone Web Design.</a>
</font>
</center>
</td>
<td width="1%" bgcolor="#0033cc" align="left">
</td>
<!-- Row 1 Column 2 -->
<td width="64%" align="left">
<font size="3" color="#000000" face="arial">
<br>
<br>
<h1>
 Our Mission
<br>
</h1>
<p>
To be the preferred provider of short- and medium- term accounting and
finance-related support to utilities throughout the United States.
<br>
<br>
<br>
  We will accomplish our mission by proudly serving each utility and by
providing:
</p>
<br>
     1. Cost-effective solutions
<br>
     2. Personalized attention to each client
<br>
     3. 100% customer satisfaction
<br>
     4. Highly qualified and competent employees
<br>
     5. Open and honest communication
<br>
     6. High morals and work ethics
<br>
<br>
<br>
<p>
  We add value to our clients' utility business in the following areas:
</p>
<br>
     1. Temporary staffing
<br>
     2. Controllership functions
<br>
     3. Accounting
<br>
     4. Training and education
<br>
     5. Tax
<br>
     6. Internal and external reporting
<br>
     7. Human resources
<br>
     8. Communication in the workplace
<br>
<br>
<br>
<center>
For more information, please e-mail us at:
<br>
<br>
<a href="mailto:[email protected]"> <a href="mailto:[email protected]" class="bb-email">[email protected]</a> <mailto:[email protected]>.</a>
</center>
</font>
</td>
</tr>
</table>
</body>
</html>
voiceone posted this at 23:03 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
must admit was a quick fix easy fix to have different color text on that background.. but was getting the error before that script too
Suzanne posted this at 23:04 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
You're right -- it's not in the head element. It's between the head element and the body element. It should NOT be there.
The style element should be in the head tags. The only JavaScript errors I'm getting are related to the text highlighter script.
voiceone posted this at 23:05 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
aha.. ok. thanx. .will try that...
voiceone posted this at 23:15 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
ok. moved it down.. (not uploaded yet).. but still get line 219 error... but if I refresh the page.. it goes away... that has been the norm on other sites I create too...
Suzanne posted this at 23:27 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
You have so many errors still -- you really should improve your basic coding skills.
Anyway: http://www.zerocattle.com/examples/voiceone/
Does this file have the errors?
voiceone posted this at 23:29 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
yes it does.. I have IE 6.0 with all the fixes too.. got the error message line 130 char 50
Suzanne posted this at 23:31 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
*sigh* okay -- what's the error? Can you print it? I'm still getting all the line 85 errors because they are so bad.
voiceone posted this at 23:33 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
only says line 130
char 50
error syntax error
code 0
Suzanne posted this at 23:37 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
Okey dokey, and you're getting that for my file as well as yours?
Error: syntax error
Source File: http://www.voiceone.net/utilibiz/
Line: 133
Source Code:
<script type='text/javascript'> is the other error I'm getting -- you have <script> and it's just a remnant -- that's why you need to validate and fix your HTML code.
It's probably the same problem.
voiceone posted this at 23:38 — 21st April 2003.
They have: 24 posts
Joined: Apr 2003
ok. thanx.. I am using arachnophilia as editor... will see what I can do with that.. thanx for all the help.. I really do appreciate it
Suzanne posted this at 23:41 — 21st April 2003.
She has: 5,507 posts
Joined: Feb 2000
Arachnophilia isn't the problem -- you have to fix the html. Try using http://validator.w3.org for help in finding the bigger problems like open tags. They WILL cause problems, as will having   instead of which you have all over the page.
You may want to seriously consider using more semantic HTML instead of spaces in the code. It will go together much smoother.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.