Mozilla problem

J

James

Now I've managed to hack around IE's most obvious problems, I'm trying
to get all the features working properly on Mozilla as well.
Unfortunately, a variable (declared in a script tag outside a function,
so it should be global) is somehow losing its definition: an alert()
elsewhere in that script has a value, but later (both in other chunks
of javascript and from the javascript console) it adopts a value of
null. Any pointers?
 
D

Daniel Kirsch

James said:
Now I've managed to hack around IE's most obvious problems, I'm trying
to get all the features working properly on Mozilla as well.
Unfortunately, a variable (declared in a script tag outside a function,
so it should be global) is somehow losing its definition: an alert()
elsewhere in that script has a value, but later (both in other chunks
of javascript and from the javascript console) it adopts a value of
null. Any pointers?

Any URL or simple example?

Daniel
 
R

Randy Webb

James said:
Now I've managed to hack around IE's most obvious problems, I'm trying
to get all the features working properly on Mozilla as well.
Unfortunately, a variable (declared in a script tag outside a function,
so it should be global) is somehow losing its definition: an alert()
elsewhere in that script has a value, but later (both in other chunks
of javascript and from the javascript console) it adopts a value of
null. Any pointers?

This groups FAQ would be the first obvious place. The people here are
not mind-readers nor can we read/diagnose code that is unseen.

Post a URL to the page that has the problem with it.
 
R

RobG

James said:
Now I've managed to hack around IE's most obvious problems, I'm trying
to get all the features working properly on Mozilla as well.
Unfortunately, a variable (declared in a script tag outside a function,
so it should be global) is somehow losing its definition: an alert()
elsewhere in that script has a value, but later (both in other chunks
of javascript and from the javascript console) it adopts a value of
null. Any pointers?

Check that you haven't declared it somewhere else also.

Check that if you've used it in a test somewhere (if, for, etc.) that
the evaluation isn't changing its value.

Post the code or a link.

Keep moving your 'alert' down the script until it fails, then you're
close...
 
J

James

Thanks Rob - most helpful reply I've seen in a while. I haven't
duplicated the declaration or changed its value anywhere, and my code
is executing as expected - it turned out to be a Heisenbug of sorts,
since the Mozilla Javascript console wasn't behaving as I expected
either.

The root problem I was trying to tackle remains - I can't call an
applet's methods in Mozilla, only in IE - but it looks like the thread
at http://forum.java.sun.com/thread.jspa?threadID=629896&tstart=60 has
the same situation and solution...
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top