Mozilla problem

Discussion in 'Javascript' started by James, Jun 21, 2005.

  1. James

    James Guest

    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?
     
    James, Jun 21, 2005
    #1
    1. Advertising

  2. 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
     
    Daniel Kirsch, Jun 21, 2005
    #2
    1. Advertising

  3. James

    Randy Webb Guest

    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
     
    Randy Webb, Jun 21, 2005
    #3
  4. James

    RobG Guest

    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
     
    RobG, Jun 21, 2005
    #4
  5. James

    James Guest

    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...
     
    James, Jun 21, 2005
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. anony
    Replies:
    2
    Views:
    1,272
    Colin Young
    Sep 21, 2004
  2. =?Utf-8?B?Qm9iIEtpcmJ5?=

    htmlInputFile problem in mozilla

    =?Utf-8?B?Qm9iIEtpcmJ5?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    377
    bruce barker
    Oct 18, 2004
  3. Alex D.

    treeview problem in Firefox-Mozilla

    Alex D., Feb 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    730
    Alex D.
    Feb 10, 2006
  4. David
    Replies:
    2
    Views:
    445
    Tor Iver Wilhelmsen
    Aug 8, 2004
  5. Henri
    Replies:
    9
    Views:
    1,846
    Toby Inkster
    Feb 22, 2005
Loading...

Share This Page