Forums

Forums / Bugs & Issues / Facing an issue with IE 9.

Facing an issue with IE 9.

Thread is closed for posting
4 posts, 1 answered
  1. vmeesaraganda
    vmeesaraganda avatar
    48 posts
    Registered:
    19 Mar 2015
    28 May 2015
    Link to this post
    We have a javascript code which will try access a value of a CRM Connector Widget on load of the page using the following code $find($(".​filedName").attr("id")).get_value(); which is throwing the following error that is breaking the entire page Unable to get property 'get_value' of undefined or null reference. Intresting this here is the same code is working fine in IE8, IE10, IE11, Chrome and Mozila browsers. Can you please adivce.

  2. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    28 May 2015 in reply to vmeesaraganda
    Link to this post
    Hello vmeesaraganda,

    In some browsers, your code will be executed before the API is ready to be used.

    Ensure that the code using $find is wrapped in a $(window).load(...) event.

    If that does not work, ensure that all of your $find calls are wrapped in the load event for Sys.Application:

    Sys.Application.add_load(function(){
     // ... $find code goes here.
    });
    

    Regards,
    Clinton
    Last modified on 28 May 2015 18:05 by Clinton Bale
  3. vmeesaraganda
    vmeesaraganda avatar
    48 posts
    Registered:
    19 Mar 2015
    29 May 2015 in reply to Clinton Bale
    Link to this post
    We have a javascript code which will try access a value of a CRM Connector Widget on load of the page using the following code $find($(".​filedName").attr("id")).get_value(); which is throwing the following error that is breaking the entire page Unable to get property 'get_value' of undefined or null reference. Intresting this here is the same code is working fine in IE8, IE10, IE11, Chrome and Mozila browsers. Can you please adivce.

    But this is working fine even in IE 9 for some systems but not in my client system.
  4. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    29 May 2015 in reply to vmeesaraganda
    Link to this post
    Hello vmeesaraganda,

    JavaScript code is heavily dependant on 3 things: the client computer (speed/bandwidth), the loading order and the browser. I doubt the browser in this case has much to do with it in this case because it works on other IE9 browsers. Have you tried the Sys.Application.add_load function yet? Normally the function will only be executed when $find can return all components.

    Some IE9 machines you are testing with may be faster than others so they always load the page on time or sometimes they may load too fast in which case not everything on the page has finished initializing yet which could cause this error.

    Please try adding the Sys.Application.add_load(...) event inside of your $(window).load(...) event.

    Thanks,
    Clinton


4 posts, 1 answered