Object doesnt support this property or method
  • Things have been fine in my wordpress site and all of a sudden in IE 7.0 I am getting an error message that the Object doesnt support this property or method. The line in the code is

    /* PRETTYPHOTO ACTIVATION */
    $("a[rel^='prettyPhoto']").prettyPhoto();

    I am not even sure where this is being pulled from. I do not get the error in Firefox
  • I only get this error in IE...working fine in Firefox and Chrome. Running IE7:

    Microsoft JScript runtime error: Object doesn't support this property or method

    The line in the code that's causing the problem is:
    $("area[rel^='prettyPhoto']").prettyPhoto();

    Any ideas?
    Thanks
  • Hi,
    change the "area" into "a", if it does not help, put your website in this post.
  • I am getting the same error, on the same line, in IE8. I just downloaded prettyPhoto today and am trying to get it to work on as aspx page. I already have the line with "a", not "area", as follows:

    $("a[rel^='prettyPhoto']").prettyPhoto();


    I have the following code at the top of my page:



    charset="utf-8" />



    Then at the bottom of my page I have:

    $(document).ready(function() {
    $("a[rel^='prettyPhoto']").prettyPhoto();
    });




    Within the page, as a simple test I have hard-coded two images for the gallery (eventually, I want to use the API and set the images during run-time but I could not get the API to work either so went with this easier step):

    Image 1

    Image 2


    Any help would be appreciated.

    Thanks.


  • hmmm, sorry, but it seems in my comment above, my inline-code is being rendered instead of being treated as text. How do we post code in our comments for review?
  • If you have a web site, usually it is easier to post it here.
    BTW, if you want inline-code, put it between [code] ... your code ... [/code] but change the "[ ]" with "<>" before and after the word "code".
  • Hi
    Did anyone ever get to the bottom of this issue?
    I am having the same problem; fine on ie9 - not on ie8!
    Any help, would be greatly appreciated.
  • dRachmad, thanks for your help. I have found that the issue I am having has nothing to do with prettyPhoto and everything to do with the integration of prettyPhoto into our website. We have a very large, content-managed asp.net website (not-for-profit), with nested master pages. In a simple website, even with nested master pages, I was able to get prettyPhoto to work. But as soon as I try to put it into our existing website, with layers and layers of user controls, calls to other javascript libraries, complicated navigation...it just doesn't work. There is perhaps some contention somewhere between javascript libraries, something dependent upon the order in which the libraries are called? I really don't know and at this point haven't a clue as to how to even begin to figure it out.
  • Update - I was able to get prettyPhoto to work by copying the reference to the pretty photo js library to the main master page, but AFTER the reference to another javascript library on our site which apparently was getting in the way of pretty photo.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter