User question: JavaScript always erroring, any browser, any site

A

Alex Rast

First of all, this is not a programming question. I'm a user, not
programming in JavaScript. I'm not, however, a novice user or even a power
user - I certainly know programming intimately as well as computer
hardware, configuration, etc... down to the lowest level (e.g. BIOS,
assembly language, etc).

Anyway, I've obviously got something wrong with JavaScript configuration,
files, etc. in Windows 2000, Service Pack 3, because on sites using
JavaScript I invariably get this JavaScript error:

message: Statement on line x: Reference to undefined variable: No such
variable 'xxxVar'

Where xxxVar is the variable being pointed to and line x is some line
number.

This behaviour is consistent across all the browsers I've used in my
system. My primary browser, however, is Opera 7.23.

As a result, I'm unable to navigate a very large number of sites (those
which provide no option other than JavaScript in order to navigate)

Is this enough information for somebody on this NG to diagnose what my
problem is and offer the fix? If not, what other info do you need in order
to tell me where the problem lies?

Thanks for your assistance.
 
L

Lasse Reichstein Nielsen

Anyway, I've obviously got something wrong with JavaScript configuration,

What is Javascript configuration?
IE can configure Javascript to be on or off, that is it.
files, etc. in Windows 2000, Service Pack 3, because on sites using
JavaScript I invariably get this JavaScript error:

message: Statement on line x: Reference to undefined variable: No such
variable 'xxxVar'

A link to such a page would be *very* helpfull in trying to understand
the problem, and understand how the variable is being used.
Where xxxVar is the variable being pointed to and line x is some line
number.
This behaviour is consistent across all the browsers I've used in my
system. My primary browser, however, is Opera 7.23.

Since different browsers use different Javascript implementations and
are otherwise unaffected by each other, the problem *must* be with the
page, not the browsers.

Do you have a rewriting proxy? That could break pages consistently
for all your browsers.
As a result, I'm unable to navigate a very large number of sites (those
which provide no option other than JavaScript in order to navigate)

Bad pages! But nevertheless, they are most liklely tested in IE and
should work. So, something is breaking the pages.
Is this enough information for somebody on this NG to diagnose what my
problem is and offer the fix?

Probably not. We don't have the code that exhibits the problem
(preferably a link). We don't have the exact error message.
All we know is one of the browsers you use, and an approximate
error message.
If not, what other info do you need in order to tell me where the
problem lies?

Link to page. Exact error message. Name and version of all affected
browsers (and Operating system). Anything affecting the connection
(proxies, anti-virus software, personal firewalls).

That is, enough to 1) reproduce and 2) recognize the error. Without
that, it's hard to 3) repair the problem (the three R's of
bugreporting :)

/L
 
R

Richard Cornford

Alex Rast wrote: said:
This behaviour is consistent across all the browsers I've
used in my system. My primary browser, however, is Opera 7.23.
<snip>

An error message that appears across all browsers with all sites might
be down to a content inserting proxy of some type (such as a firewall or
a program like Proximatron) that is inserting erroneous code into every
page that passes through it.

You can examine/eliminate this possibility by viewing the source of a
page exhibiting the error on your machine, saving it, and then viewing
the page on a system that doesn't exhibit the problem, saving that page
source and comparing the two saved source files.

Richard.
 
A

Alex Rast

at Sun, 29 Feb 2004 02:00:50 GMT in <[email protected]>,
What is Javascript configuration?
IE can configure Javascript to be on or off, that is it.

Well, for instance, Opera can configure multiple options including that of
opening JavaScript console, allow various window operations, and several
others. I'll agree that I haven't found many real configuration options,
and to me that's frustrating, because your answer is in many ways typical
of the kinds of answers that seem to be the only ones I've been able to get
using my own research - i.e. "It should just work..."

It's worth noting that I am *extremely* un-fond of MSIE and use it only as
a *last* resort, if the page absolutely requires it. As a result the Win2K
installation on my computer that has MSIE installed is a completely
separate one on a different drive that is not the install I use regularly.
The Win2K installation that I use most of the time does not have MSIE
installed, and a very concerted effort was made to ensure that during the
original install of the OS, no MSIE components were inadvertently
installed.
A link to such a page would be *very* helpfull in trying to understand
the problem, and understand how the variable is being used.

Examples: http://www.samsung.com
http://www.petzl.com
http://www.qwest.com/chooseRegion?marketUnit=residential

Need I give more examples? The problem occurs on many sites, and not sites
operated by small companies who might not have the resources or the in-
house expertise to make sure there weren't any glaring JavaScript errors at
*their* end.
Since different browsers use different Javascript implementations and
are otherwise unaffected by each other, the problem *must* be with the
page, not the browsers.

It would seem to me unlikely. Are large companies like Samsung and Qwest
going to have fundamental problems with their site that prevent users even
from being able to navigate them at all? My guess is that if they did, it'd
have been caught and fixed *long* before now.
Do you have a rewriting proxy? That could break pages consistently
for all your browsers.

Is ZoneAlarm Pro one? It's a S/W firewall, but I don't know whether in
order to achieve this capability it's a proxy. Can you describe a
"rewriting proxy"? I'm familiar with and have used proxies, but I haven't
heard that specific term before.
Bad pages!

Agreed. But there seem to be a huge number of pages that do exactly that.
The big favourite is sites whose only navigation method is a drop-down menu
or a side navigation bar. However, I've seen a lot of variations as well.
But nevertheless, they are most liklely tested in IE and
should work. So, something is breaking the pages.


Probably not. We don't have the code that exhibits the problem
(preferably a link). We don't have the exact error message.
All we know is one of the browsers you use, and an approximate
error message.

I refrained from giving an example in my initial e-mail because I didn't
want the focus to become *that* site - as though the problem were confined
to a specific Web site or company. Since the problem is happening on
multiple sites, I believe it must be something wrong on my end.
Nonetheless, I'm happy to provide an *example* of the error messages, in
this case, from the Samsung site. These are the errors I get immediately,
as soon as I go to http://www.samsung.com

Inline script thread
Error:
name: ReferenceError
message: Statement on line 2: Reference to undefined variable: No such
variable 'ImgPreLoad'
Backtrace:
Line 2 of inline#2 script in http://www.samsung.com/
ImgPreLoad("/images/TMenu", 5);


http://www.samsung.com/
Event thread: onmouseover
Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: No such
variable 'imgOver'
Backtrace:
In unknown script
imgOver("1");
At unknown location
{event handler trampoline}

http://www.samsung.com/
Event thread: onmouseout
Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: No such
variable 'imgOut'
Backtrace:
In unknown script
imgOut("1");
At unknown location
{event handler trampoline}

http://www.samsung.com/
Event thread: onload
Error:
name: ReferenceError
message: Statement on line 1: Reference to undefined variable: No such
variable 'imgOver'
Backtrace:
In unknown script
imgOver(_MCurrentOn);
At unknown location
{event handler trampoline}
Link to page. Exact error message. Name and version of all affected
browsers (and Operating system).

I mentioned before Opera 7.23 and Win2K SP3. I've also tried the pages
using Netscape 4.08 and MSIE 5.0.
Anything affecting the connection
(proxies, anti-virus software, personal firewalls).

ZoneAlarm Pro 4.0
Antivirus: NOD32
That is, enough to 1) reproduce and 2) recognize the error. Without
that, it's hard to 3) repair the problem (the three R's of
bugreporting :)

Fair enough. I wanted to make sure, first, however, that it wasn't a
common, obvious problem that people are familiar with just by a basic
description.
 
L

Lasse Reichstein Nielsen

It's worth noting that I am *extremely* un-fond of MSIE and use it only as
a *last* resort, if the page absolutely requires it.

Me too :) Although I admit to having IE 6 installed (and IE 5.5, 5, 4
and 3 :)

Need I give more examples?

These should be sufficient.
Is ZoneAlarm Pro one? It's a S/W firewall, but I don't know whether in
order to achieve this capability it's a proxy. Can you describe a
"rewriting proxy"? I'm familiar with and have used proxies, but I haven't
heard that specific term before.

A rewriting proxy is simply a proxy that changes the data going
through it. I use Proximitron to remove certain Javascripts and
advertisments from pages before they reach my browser. Before Opera
added popup-blockers, I used it for that too. Some programs filter the
incoming data at the network layer (anti-virus, perhaps zone-alarm),
and could/should be considered proxies as well.

In your case, I don't *think* ZoneAlerm is the problem (although they
can have added functionality since I last looked at it), but the
antivirus program is a good candidate.
These are the errors I get immediately,
as soon as I go to http://www.samsung.com

Inline script thread
Error:
name: ReferenceError
message: Statement on line 2: Reference to undefined variable: No such
variable 'ImgPreLoad'
Backtrace:
Line 2 of inline#2 script in http://www.samsung.com/
ImgPreLoad("/images/TMenu", 5);

Ok, looking at the page, this happens in the third script element.
The function ImgPreLoad is defined in the file loaded in the second
script element (src="modules/JS/menu_nav.js"). I don't get the
error (or any at all) in Opera 7.5preview2, Opera 7.23, or IE 6.

Try loading the Samsung page againg and view source. The second and third
script elements should be:
---
<script language="JavaScript" src="module/JS/menu_nav.js"></script>
<script language="JavaScript">
ImgPreLoad('/images/TMenu',5);
_MCurrentOn = 0 //Main menu status
</script>
---
If it isn't, something has changed the page on you.

If it is, try going directly to the script source (e.g., write it in
the address line):
<URL: http://www.samsung.com/module/JS/menu_nav.js >

Then search for the declaration of ImgPreLoad. It should be there (on
line 333 if you view the source).

Now try turning off the antivirus program for a moment and reload the
page. Do the same with ZoneAlarm (if it has any feature that it calls
anything with "web", it's a good candidate).
ZoneAlarm Pro 4.0
Antivirus: NOD32

My bet is on the antivirus ... except that NOD32 is an on-demand
scanner? Not sure. All I know is what I can read here:
<URL: http://www.nod32.com/products/nt.htm >
and I can't really see what it does from this.

Ditto for ZoneAlarm:
<URL: http://www.zonelabs.com:80/store/ap...p&event=link1.skuList&&zl_catalog_view_id=201>
They seem to have added a lot of functionality to the pro version,
so I won't rule it out.
Fair enough. I wanted to make sure, first, however, that it wasn't a
common, obvious problem that people are familiar with just by a basic
description.

I don't think so. At least I am not familiar with it :)

Good luck.
/L
 
R

Richard Cornford

Lasse Reichstein Nielsen wrote:
Ditto for ZoneAlarm:
They seem to have added a lot of functionality to the
pro version, so I won't rule it out.
<snip>

ZoneAlarm does act as a content inserting proxy, it has options for
pop-up blocking that insert the (now demonstrated ineffective)
window.open function replacing script. And it has privacy filtering
options that will re-write references to "cookie" in client-side code.
It may well have add blocking as well.

I also recall people with javascript problems relating to ZoneAlarm
finding it difficult to disable all of its page modifying behaviour in
the past.

Richard.
 
D

Dr John Stockton

JRS: In article <[email protected]>, seen in
Richard Cornford
Lasse Reichstein Nielsen wrote:


<snip>

ZoneAlarm does act as a content inserting proxy, it has options for
pop-up blocking that insert the (now demonstrated ineffective)
window.open function replacing script. And it has privacy filtering
options that will re-write references to "cookie" in client-side code.
It may well have add blocking as well.

I also recall people with javascript problems relating to ZoneAlarm
finding it difficult to disable all of its page modifying behaviour in
the past.

ISTM that it could be useful to have, in conjunction with the FAQ, a
simple javascript test page - compatible with ECMA standards and with
common browsers - just to see if javascript is working properly.

The first paragraphs might be
<body>
This sentence is plain HTML, requiting no scripting.

<p>If this sentence is not followed by OK in round brackets,
javascript is not working.
<script ...>
document.writeln("(OK)")
</script>
</noscript>This is NOSCRIPT text</noscript>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top