Javascript error conflict between separate classes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xhunter
    New Member
    • May 2007
    • 42

    Javascript error conflict between separate classes

    I have been working on this for some time and I came to the conclusion that I have no idea what is the problem,

    I am sure it should be something simple that I am overlooking, but I can't figure where,

    I have written some classes to load the google map using google map API and a grid using extjs,

    here is the page :
    http://tinyurl.com/5clr49

    and here is the classes:
    http://tinyurl.com/6ryng5

    no problem here, everything works fine and no issues,

    first I will explain what is going on:

    variables are set in "pxxx_map_s et" and "pxxx_grid_ set" (xxx=228),

    after the calss object is created :
    Code:
     var pxxx_Google_Grid = new pxxx_Google_Grid_UI; 
     var pxxx_Google_Map = new pxxx_Google_Map_UI;
    those variables are sent to this object with "init" function :
    Code:
     Ext.onReady(function(){pxxx_Google_Grid.init(pxxx_grid_set,pxxx_Google_Map);}, pxxx_Google_Grid, true);
     window.setTimeout(function(e) {pxxx_Google_Map.init(pxxx_map_set,pxxx_Google_Grid)},'0');
    no problem here,

    now here is another clone with different "xxx" (2000) name:
    http://tinyurl.com/59ghs3

    the script is exactly the same,

    that one also works fine,

    now if you put them together :
    http://tinyurl.com/6zby37

    errors start appearing:
    Code:
    v is undefined
    at first I had the two of the pages create an instance of the same class name and I thought maybe there is a conflict,
    but later on when I gave each of the page it's own separate class:

    first page (xxx=228):
    pxxx_Google_Map _UI()
    and
    pxxx_Google_Gri d_UI ()

    and 2nd page (xxx=2000):
    pxxx_Google_Map _UI()
    and
    pxxx_Google_Gri d_UI ()

    Now I can not understand why these 2 are conflicting.

    ps.
    "v" is set through "init" from "pxxx_map_set.v "

    I just cant figure out where is my mistake,
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    There doesn't seem to be any errors, so I guess this has been solved. Does make sense, I suppose, when you consider it's been a month since you posted ;)

    Comment

    Working...