Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Mozilla problem

Reply
Thread Tools

Mozilla problem

 
 
James
Guest
Posts: n/a
 
      06-21-2005
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?

 
Reply With Quote
 
 
 
 
Daniel Kirsch
Guest
Posts: n/a
 
      06-21-2005
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
 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      06-21-2005
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
 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      06-21-2005
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
 
Reply With Quote
 
James
Guest
Posts: n/a
 
      06-21-2005
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...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mozilla pieces versus Mozilla Suite Doug Chadduck Firefox 40 02-12-2006 10:27 PM
Windows Media opening outside Mozilla not in a Mozilla Window Jim Firefox 3 12-17-2005 02:00 AM
CSS Mozilla: Make Mozilla not ignore height style of an inline element Henri HTML 9 02-22-2005 06:08 PM
My CUSTOM Versions Of Mozilla Fiorefox & Mozilla Thunderbird Norvin Adams III Firefox 6 07-13-2004 03:26 PM
mozilla 1.5 from mozilla 1.4 Disco Firefox 6 11-07-2003 04:34 PM



Advertisments