none
Microsoft JScript runtime error: Unable to get value of the property

    Question

  • Hi,

    I am getting the error "Microsoft JScript runtime error: Unable to get value of the property "" undefined or Null value". while running the asp.net application in IE9 with infragistic 10.3.

     

    Thanks,

    Tamasa

    Friday, December 30, 2011 12:31 PM

All replies

  • Hi Tamasa,

    So what is the specific error or code? Just this general error message, it is hard to know the root cause. I think the varible may be null or undefined in your JS code or infragistic 10.3 component. So please try to arrow the scope, and get the specific code line that throw this error. Then we could know if your code, .Net Framework ASP.Net code or infragistic code has error. Thanks.

    Sincerely,


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 02, 2012 2:58 AM
  • Hi Bob,

    Thanks for the reply...

    The above problem is not there in IE8... In IE9 only i am facing the problem

    function ProductivityGraphControls()

    {

        if (top.document.all.XYZProd.contentWindow.main == null) 

        {

            this.MonthYear = null;

            this.Measure = null;

            this.FTEsHours = null;

            this.PerStat = null;

            this.onChange = null;

            return;    

        }

     

        prodGraphCtl_SetValues();

     

        this.MonthYear = function() {return prodGraphCtl_MonthYear;}

        this.Measure = function() {return prodGraphCtl_Measure;}

        this.FTEsHours = function() {return prodGraphCtl_FTEsHours;}

        this.PerStat = function() { return prodGraphCtl_PerStat; }

        this.onChange = prodGraphCtl_SetValues

    }

    The above code gives "Microsoft JScript runtime error: Unable to get value of the property "contentWindow" undefined or Null value"...

     

    Hope this will help.

    Thanks in Adv,

    Tamasa.

    Monday, January 02, 2012 6:46 AM
  • Is "top.document.all.XYZProd.contentWindow" undefined in IE 9? So "XYZProd" is the ID of one element in your document. What is the "XYZProd" element type? But "document.all" it is not a W3C way to get the specific ID element. We still recommend you to use the document.getElementById method instead.

    And on the other hand, I suggest you to enable the developer tools in IE9 (press F12), and start the debugging for script, set one breakpoint at the code

     if (top.document.all.XYZProd.contentWindow.main == null)

    and view the result in the debugger console.

    Sincerely,

    nbsp;


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Bob_BaoMVP Monday, January 02, 2012 8:57 AM
    Monday, January 02, 2012 8:56 AM
  • Yes " top.document.all.XYZProd.contentWindow" is undefined in IE9. And XYZProd is the id of an iFrame in my main page in which other controls or pages are loaded as per the selection. 

    Below pasted the aspx part...

    <body style="margin:0">

            <iframe id="XYZProd" src="index.aspx?<%=Request.ServerVariables("QUERY_STRING")%>" scrolling="no" frameborder="0" style="width:100%;height:100%" ></iframe>

        </body>

     


    Monday, January 02, 2012 9:45 AM
  • I tested the simple HTML code with one iFrame same with yours. It can work in IE9. I think it should be occurred by other place. I suggest you first enable the developer tools in IE 9 (Press F12), then set one breakpoint and view the result in the script debugger.

    On the other hand, is the script before the iFrame, please move it to the end of the iFrame.

     

    edit: Could you please check the "top", if your iFrame in the "top" target region?


    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us

    • Edited by Bob_BaoMVP Tuesday, January 03, 2012 4:00 AM
    Tuesday, January 03, 2012 3:55 AM
  • Any update?
    Bob Bao [MSFT]
    MSDN Community Support | Feedback to us
    Monday, January 09, 2012 3:43 AM
  • MSDN Forum on your desktop ? Well, dunno about before but it certainly is now.
     
    Sorry for the thread hijack, but have I found you ? Is this your gadget ?
     
     
    If it is and you haven't already you might want to have a look at these threads
    Hope you don't mind what I did.
    I have to go back to the real world on Monday anyway and you can pretend I'll revert to being a beer swilling swine.
    In fact, don't pretend.
    And while I'm here - I can understand Microsoft abandoning sidebar gadgets but why would someone like yourself abandon the forum ? Why leave a stooge like me to answer questions?
    Particularly when there are people like this chap with 20000pc's - you'd think that'd make them a good customer - wanting answers. (I'd appreciate it btw, if someone could have a look at that one.)
    Thursday, January 19, 2012 2:44 AM