Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    3
    Vote Rating
    0
    kenorb is on a distinguished road

      0  

    Default Ext JS conflict with other scripts on the page

    Ext JS conflict with other scripts on the page


    I'm using Ext JS with OpenLayers for the map in Drupal, where user can select different WMS maps.
    I'm including following JS files:
    http://extjs.cachefly.net/ext-2.2.1/...xt/ext-base.js
    http://extjs.cachefly.net/ext-2.2.1/ext-all.js
    on every page where I've link with popup to the map widget.

    Here is the demo:
    http://46.137.100.142/inspire/2_0_0_2/searchmapwms.htm

    After integrated with others scripts, some of the variables contain weird __proto__ function called remove() which cause JS syntax errors.

    In example:
    Following code works without problems:
    Code:
        pairs = location.search.split("\?")[1].split("&");
        for (i in pairs) {
        
            keyval = pairs[i].split("=");
            
            if (keyval[0] == "easting" || keyval[0] == "ebl") 
                this.eastBndLon = parseFloat(keyval[1]);
            if (keyval[0] == "westing" || keyval[0] == "wbl") 
                this.westBndLon = parseFloat(keyval[1]);
            if (keyval[0] == "northing" || keyval[0] == "nbl") 
                this.northBndLat = parseFloat(keyval[1]);
            if (keyval[0] == "southing" || keyval[0] == "sbl") 
                this.southBndLat = parseFloat(keyval[1]);
            if (keyval[0] == "url" || keyval[0] == "u") 
                this.urls.push(decodeURIComponent(keyval[1]));
        }
    But when I include Ext JS files, pairs contain somehow additional hidden function, which is counted as the last element of pairs, so code trying to execute:
    Code:
    pairs['remove'].split("=");
    which is wrong.

    Another example:
    Code:
        for (var n in userFlags) {
          var flagInfo = userFlags[n].match(/(\w+)_(\d+)/);
          var flagName = flagInfo[1];
          var contentId = flagInfo[2];
          // User flags always default to off and the JavaScript toggles them on.
          if (templates[flagName + '_' + contentId]) {
            $('.flag-' + flagName.flagNameToCSS() + '-' + contentId, context).after(templates[flagName + '_' + contentId]).remove();
          }
        }
    userFlags contain 1 element, but has this weird function remove(). In Chrome Inspector you can't see that this object contain 2 elements, only in Firebug if you eventually analyse it more deeply.
    And this code breaks with error:
    Uncaught TypeError: Object function ({var A=this.indexOf(;if(A!=-1){this.splice(A,1)}return this} has no method 'match'
    because last element of userFlags contains proto function:
    Code:
    remove: function (B){var A=this.indexOf(B);if(A!=-1){...
    See the screenshot fo details.




  2. #2

  3. #3
    Sencha - Community Support Team mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
    mystix will become famous soon enough

      0  

    Default


    and my answer is still the same as it was 3 years ago
    http://www.sencha.com/forum/showthre...l=1#post181372

    Why don't you just use a traditional for loop?

Similar Threads

  1. Scripts dont work on tab content page
    By AlThar in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 20 Jan 2011, 5:01 AM
  2. Replies: 0
    Last Post: 10 Aug 2010, 5:55 AM
  3. About GXT and EXT CSS conflict
    By likebean in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 12 Jan 2010, 7:22 PM
  4. Css conflict?
    By jchamb2010 in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 26 Nov 2009, 9:38 PM
  5. run scripts in a ContentPanel.setUrl loaded page
    By SmyersM in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 11 Apr 2007, 11:43 AM

Thread Participants: 1