Theia installation has been updated - September 10, 2011
« Feb. 2012
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28        
Theia
jQuery "Object doesn't support this property or method" 1.4.2 - SOLUTION! « home
icon
posted on 14:57 - 08 June 2010 | posted by Lev
last modified on 18:52 - 11 June 2010 | last modified by Lev
jQuery "Object doesn't support this property or method" 1.4.2 - SOLUTION!
When I released the last version of Theia, I had included the latest version of jQuery (1.4.2) as well, without any consideration into if it really was stable.
 
Sadly, a quick google for "Object doesn't support this property or method" will show otherwise. Lots and lots of folks out there have been encountering errors in various versions of IE with the latest version of jQuery, as was I. Ironically, the older release of jQuery didn't seem to have this problem.
 
I stumbled upon one solution which was to go into your advanced security options of IE and unticking an option, but this isn't something you can realistically tell all your visitors to do, so I looked for other solutions. The best one I've been able to come up with was to to add some extra code into your AJAX call telling versions of IE 7 and under to use ActiveX instead of the XMLHttpRequest. This solution has been the best, but it didn't quite do it all for me for a couple of reasons. First of all, I am testing on IE8, where the issue is STILL present, so I needed to catch all versions of IE. Secondly, it is unrealistic for me to go through the hundreds of different AJAX requests and add this code, so instead I am using jQuery's ajaxSetup method to apply the rule to *all* AJAX requests in jQuery, which sure enough completely resolves the issue for me. Here is the code I threw into document's head:
 
<script type='text/javascript'>
$(
function ()
    {
    $.ajaxSetup
        ({
        xhr: function()
            {
            if ($.browser.msie)
                {
                return new ActiveXObject("Microsoft.XMLHTTP");
                }
            else
                {
                return new XMLHttpRequest();
                }
            }
        })
    }
)
</script>
 
Hopefully this helps someone else who is struggling with this issue!
tags
  • 10
post reply
Danieo
quote
posted by: guest 72.52.116.236 · date: 2:12 - 14 November 2011
You will discover only moment variations involving these halter wedding dress and involving the first look at and a variety of princess wedding dresses. One has to perform a good deal of study and empire waist wedding dress to discover out and observe the very same and make certain the viability on the item they're acquiring. Every one of these replica have particular defect, plus size wedding dresses, which would make them purchaser through the best authentic Rolex enjoy.
i get an error in IE for this jqyery.tabs.history.js and button functionality is not working
quote
posted by: durga · date: 10:54 - 09 November 2011
durga

$(function(){
  // The "tab widgets" to handle.
  var tabs = $('.tabs'),
    
    // This selector will be reused when selecting actual tab widget A elements.
    tab_a_selector = 'ul.ui-tabs-nav a';
 
  // Enable tabs on all tab widgets. The `event` property must be overridden so
  // that the tabs aren't changed on click, and any custom event name can be
  // specified. Note that if you define a callback for the 'select' event, it
  // will be executed for the selected tab whenever the hash changes.
  tabs.tabs({ event: 'change' });
 
  // Define our own click handler for the tabs, overriding the default.
  tabs.find( tab_a_selector ).click(function(){
    var state = {},
      
      // Get the id of this tab widget.
      id = $(this).closest( '.tabs' ).attr( 'id' ),
      
      // Get the index of this tab.
      idx = $(this).parent().prevAll().length;
    
    // Set the state!
    state[ id ] = idx;
    $.bbq.pushState( state );
  });
 
  // Bind an event to window.onhashchange that, when the history state changes,
  // iterates over all tab widgets, changing the current tab as necessary.
  $(window).bind( 'hashchange', function(e) {
    
    // Iterate over all tab widgets.
    tabs.each(function(){
      
      // Get the index for this tab widget from the hash, based on the
      // appropriate id property. In jQuery 1.4, you should use e.getState()
      // instead of $.bbq.getState(). The second, 'true' argument coerces the
      // string value to a number.
      var idx = $.bbq.getState( this.id, true ) || 0;
      
      // Select the appropriate tab for this tab widget by triggering the custom
      // event specified in the .tabs() init above (you could keep track of what
      // tab each widget is on using .data, and only select a tab if it has
      // changed).
      $(this).find( tab_a_selector ).eq( idx ).triggerHandler( 'change' );
    });
  })
 
  // Since the event is only triggered when the hash changes, we need to trigger
  // the event now, to handle the hash the page may have loaded with.
  $(window).trigger( 'hashchange' );
 
});
nobody » 5 AP » total items: 0 / total posts: 0 » 0.000 / 0.000
script error
quote
posted by: guest 122.164.25.220 · date: 13:33 - 08 March 2011
    return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
            // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
            elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
            elem.document.body[ "client" + name ] :

            // Get document width or height
            (elem.nodeType === 9) ? // is it a document
                // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
                Math.max(
                    elem.documentElement["client" + name],
                    elem.body["scroll" + name], elem.documentElement["scroll" + name],
                    elem.body["offset" + name], elem.documentElement["offset" + name]
                ) :

                // Get or set width or height on the element
                size === undefined ?
                    // Get width or height on the element
                    jQuery.css( elem, type ) :

                    // Set the width or height on the element (default to pixels if value is unitless)
                    this.css( type, typeof size === "string" ? size : size + "px" );
    };
 
Thanks Tons for this fix
quote
posted by: guest 65.183.42.106 · date: 23:00 - 23 August 2010
I just spent 3 hrs diggin around in MY code looking for this error. Your fix saved me another 3...or more.
 
NOTE: I did find that this same problem was causing problems in Chrome also. It did NOT report an error, but the display of returned JSON data failed and the submit function would redirect to 'action' page instead of stopping the event propogation as it should have.
Thank you!
quote
posted by: guest 187.49.171.76 · date: 22:09 - 17 August 2010
It also works for me like a charm. The sad part of that is we are still working to solve IE issues. I hate IE!
Error
quote
posted by: guest 122.172.112.141 · date: 14:07 - 04 August 2010
The error code is submitted below
 
function search_by_id()
      {
          $.ajax({
             url: 'search_by_id.php',
             data:'id='+$('#sbid').val(),
             success: function(data) {
                   $('#iderrordiv').html(data);
                  
             }
           });
      }
 
 
 
the same error specified in the above screenshot is occured please help me
My Gratitude
quote
posted by: guest 68.34.64.149 · date: 16:56 - 19 July 2010
Thanks much for helping out with this issue. Your solution saved me a lot of time and works like a charm.
Bookmark item @
bookmarkbookmarkbookmarkbookmarkbookmark