javascript error: "o is undefined"

3 posts, 0 answers
  1. John Chatt
    John Chatt avatar
    24 posts
    Member since:
    Feb 2010

    Posted 25 May 2010 Link to this post

    i keep getting this error at random times. it's rarely with the same file and I can't seem to get it to happen consistently. I have no idea why it is happening but whenever it does it freezes the upload.

    it happens at this line of code

    "if(c(o.rowElement).parents().length==0){return;0}"

    inside the telerik control's web resource
  2. Daniel Gioulakis
    Daniel Gioulakis avatar
    7 posts
    Member since:
    Feb 2010

    Posted 26 May 2010 Link to this post

    Hi,
    Working with John we've uncovered a little more where the problem lies.  Within RadAsyncUpload.js we encounter a nullreference or "undefined" exception in the function below:

    "frameDocument" becomes set, however, "inputInfo" is undefined.

    _onFrameLoad : function (frame, inputInfo) { 
                var frameDocument = null
                 
                try { 
                    frameDocument = frame.contentDocument || frame.contentWindow.document
                } 
                catch (e) { 
                    this._onFileUploadFail(inputInfo, ""); 
                    return;                     
                } 
                 
                if (frameDocument) { 
                    if($(inputInfo.rowElement).parents().length == 0) 
                        return

    The problem can be consistently reproduced, though the process is fairly complex.  We have a page which contains a user control, which in turn, contains our AsyncUploader.

    Our page displays the user control via an async postback using RadAjaxManager.  The user control is always on the page, but initially visibility is set to false.

    See Screenshots:
    screenuchidden.jpg -> Page with user control hidden
    screenucvisible.jpg -> User control shown

    To replicate the problem, we show the user control and hit "Save" without attaching anything with the AsyncUpload.  The user control is then hidden again.

    We then go to add another "New Proof", and attach a file. When the AsyncUpload process starts it breaks with the exception John had mentioned in his original post.  Strangely, we can then click "Remove" on the uploader and re-select a file and the upload process works again.

    In an attempt to summarize our problem: When we try to attach/upload a file, the upload always works ... unless it's followed by a postback in which no file was selected for attachment.


    If I can clear this up any further please let me know. Thanks!

    Daniel

  3. Daniel Gioulakis
    Daniel Gioulakis avatar
    7 posts
    Member since:
    Feb 2010

    Posted 26 May 2010 Link to this post

    Bug fixed!

    Note for other Telerik users who might encounter this error.
    Updating your RadControls to the most recent version (RadControls for ASP.NET AJAX Version: 2010.1 519 (May 19, 2010) at time of writing this) will fix this bug.

    Thanks!
Back to Top