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? 5 1168
James wrote: 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
James wrote: 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.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
James wrote: 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...
--
Rob
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.jsp...9896&tstart=60 has
the same situation and solution...
This is the same type of trouble I'm having as reported in the thread
"Tooltips position at prior-set location in Firefox." In my case, the
variable is returning its PREVIOUS value at the time that it is passed into
code that controls the location of my tooltip. If the problem was merely
that the variable becomes corrupted or a global/local aspect is involved, it
should affect the IE results, too, which it doesn't.
--
David Hayes
(remove the name of the programming language from email address to make it
usable)
"James" <ja******@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com... 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.jsp...9896&tstart=60 has the same situation and solution... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Neil Zanella |
last post by:
Hello,
I just ran into an interesting problem with cookies while
using PHP 4 and Mozilla 1.6. Basically, I have been using
PHP on a site called:
foo.bar.net?script.php
Within that script I...
|
by: Peter |
last post by:
Hello,
First of all, sorry for all the code. I don't know how to explain my
problem without it.
I have a javascript function which can build a webpage dynamically. A
striped down version of...
|
by: Peter Bremer |
last post by:
Hi all,
I've written this little piece of code, which doesn't seem to work in
Mozilla 1.5. I haven't tried it on other Gecko browsers, but I've found
some indication that Netscape 6+ has the...
|
by: For Example: John Smith |
last post by:
Hello!
Javascript beginner here, looking for some help. I discovered this
problem tonight while playing with my site using Mozilla. I don't have
Netscape on this computer but I assume this...
|
by: delerious |
last post by:
Could someone please take a look at this page:
http://home.comcast.net/~delerious1/index11.html
The set of links on the left should not have any whitespace between them, and
the set of links...
|
by: Don Adams |
last post by:
Does the Mozilla browser even support CSS?
Very few of my stylesheet formats work in Mozilla.
Is there a local stylesheet that is overriding my stylesheet?
If so, is there an option to turn off...
|
by: Patrick |
last post by:
Hi
I am fairly new to CSS and the web.I am trying to build a site more to
practice my skills than for the site itself.
I have been focusing on CSS and try my best to make it work in I.E
6.0,...
|
by: nick |
last post by:
In the web site http://greywolfdesign.com , there is a pop-up menu (when
mouse over 'Portfolio' menu item), it always works well when using IE (6).
However, when using Mozilla 1.6, the popup...
|
by: Peter Wright |
last post by:
Hi all.
Hopefully this should demonstrate the problem I'm having:
http://flooble.net/~pete/focus-problem-demo/
(I'm testing it in Mozilla only, but I'm not sure if it's actually a...
|
by: niftyhawk |
last post by:
Hi,
Can anybody give me a simple example of how to Call Web Services from
Mozilla based Browsers ? I can call web services from IE browser using
web service behavior file, without any problems....
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |