473,466 Members | 1,388 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Javascript error conflict between separate classes

42 New Member
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_set" and "pxxx_grid_set" (xxx=228),

after the calss object is created :
Expand|Select|Wrap|Line Numbers
  1.  var pxxx_Google_Grid = new pxxx_Google_Grid_UI; 
  2.  var pxxx_Google_Map = new pxxx_Google_Map_UI;
  3.  
those variables are sent to this object with "init" function :
Expand|Select|Wrap|Line Numbers
  1.  Ext.onReady(function(){pxxx_Google_Grid.init(pxxx_grid_set,pxxx_Google_Map);}, pxxx_Google_Grid, true);
  2.  window.setTimeout(function(e) {pxxx_Google_Map.init(pxxx_map_set,pxxx_Google_Grid)},'0');
  3.  
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:
Expand|Select|Wrap|Line Numbers
  1. 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_Grid_UI ()

and 2nd page (xxx=2000):
pxxx_Google_Map_UI()
and
pxxx_Google_Grid_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,
Aug 28 '08 #1
1 1539
acoder
16,027 Recognized Expert Moderator MVP
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 ;)
Sep 26 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: John | last post by:
I am using two large libraries which both have an implementation of a "matrix" class. I have the source code for both. I need to use them in the same project and when I try to compile I get a...
7
by: Kevin Newman | last post by:
I've been toying with a namespace manager, and wanted to get some input. So what do you think? if (typeof com == 'undefined') var com = {}; if (!com.unFocus) com.unFocus = {}; ...
0
by: Caesar Augustus | last post by:
I'm having a problem with two different javascript controls in my app. The first chuck of javascript that I pasted into my app is the client-side calendar control popup which works fine when first...
5
by: Jay A. Moritz | last post by:
Error: The dependency '<my dll>' in project '<my project>' cannot be copied to the run directory because it would conflict with dependency '<my dll>'. I am getting a dependency error building...
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
10
by: Tom Cole | last post by:
While I've done javascript work for as long as I can remember (since Netscape first released it), I've only ever used it for trivial things, change a color here, validate a text element there, blah...
35
by: jeffc226 | last post by:
I'm interested in an idiom for handling errors in functions without using traditional nested ifs, because I think that can be very awkward and difficult to maintain, when the number of error checks...
9
by: Meendar | last post by:
Hi, Below is my code snippet having only one form, <form> <input type ="radio" name="action" value="xyz" checked>xyz <input type ="radio" name="action" value="zyx">zyx <input type ="radio"...
5
by: voidinutah | last post by:
Hello, I'm new to .NET and was trying to find a solution for having a button control do a post back then execute a javascript function. When the button is clicked a post back occurs to save...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.