IE6 JavaScript error

Feb 19, 2009 at 10:48 AM
Edited Feb 19, 2009 at 2:50 PM
Hello,

Unidentified javascript error that appears during page load only on IE6.
To reproduce the error, I created a new aspx page and embedded the flajaxian component. It throws, during page load, the generic js error "object does not support this property or method" code:0, line 1, character 83. The component seems to work fine on the client side and server side, despite the error.

The aspx page looks like that:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="FileUploader.aspx.vb" Inherits="Testing.FileUploader" %>
<%@ Register TagPrefix="fjx" Namespace="com.flajaxian" Assembly="com.flajaxian.FileUploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>FileUploader</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <fjx:FileUploader ID="fu1" runat="Server" IsDebug="true">
            <Adapters>
                <fjx:FileSaverAdapter FolderName="temp" />
            </Adapters>
        </fjx:FileUploader>
    </div>
    </form>
</body>
</html>


The source for the component generated by IE6 look like that (excluding the css reference):
<script src="/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMuvjEjcujVuxO9iXTKicxBzTVMCqGrhTIl6SzjY4oTlEA2&amp;t=633689096480227368" type="text/javascript"></script>
<script src="/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMt-Hlzo41jJ1DJOE6HIoOyU2iNtmJ4a3feYC9ZPuWFUNw2&amp;t=633689096480227368" type="text/javascript"></script>
    <div>
        <div id="fu1">
    <a href="http://get.adobe.com/flashplayer/" target="_blank">Please install Adobe Flash Player</a>
</div>
<script type="text/javascript" language="javascript">
    window.fu1 = new Flajaxian.FileUploader2('fu1');
    function fu1_MarkInitialized(){ window.fu1.markInitialized(); }
    function fu1_SetFileList(list){ window.fu1.setFileList(list); }
    function fu1_SetUploadProgress(evt){ window.fu1.setUploadProgress(evt); }
    function fu1_SetChangedFileStates(list){ window.fu1.setChangedFileStates(list); }
    function fu1_LimitReached(type){ window.fu1.limitReached(type); }
    function fu1_ConfirmUpload(){ window.fu1.confirmUpload(); }
    function fu1_Dispose(){ window.fu1.dispose(); }
    function fu1_EmbedFlash(){
        var p = {menu:false,base:'.',scale:'noscale',bgcolor:'#FFFFFF'};
        var a = {};
        var fv = {id:"fu1",targetUrl:"http://localhost/Testing/fileuploader.aspx?__ID=fu1_(!AMP!)___AspCookie.Session=yht3pdvjoz3u2255s2ftaibx_(!AMP!)___AspCookie.Auth=805B4AD2ED4E7CE6B972559247445D875C1362D2E3AEF37B28B814538FF89F2AD4CD168E8FD3EA5F6FD0A8F30B3491975D326F1E15A8A2E2120F3B509A45239F_(!AMP!)_",debug:true,enabled:true,isIE:Flajaxian.isIE(),clearListAtEnd:true,uploadRequiresJsConfirmation:false,initiallyInvisible:false,maxFileSize:1072668082176,maxFileQueueSize:1072668082176,maxFileNumberLimit:2147483647};
        swfobject.embedSWF("/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMvB2TjzjQzgEAtYi9G9ipaj2q_Q21VN-jK_SFRsTqfTwRynyXBUgKWDDdy7CQF3zdE1&t=633689096480227368", "fu1", "251", "40", "9.0.0", "/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMvB2TjzjQzgEAtYi9G9ipajTrMUIZ-Vx4UM7PkJXqKMZBKHnTHs-3AAFaTduKiGMKk1&t=633689096480227368", fv, p, a);
        var fu = window.fu1;
        fu.set_generateBaseHtmlFunc(Flajaxian.generateBaseHtml);
        fu.set_generateFileRowFunc(Flajaxian.generateFileRow);
        fu.set_disposeFileRowFunc(Flajaxian.disposeFileRow);
        fu.set_fileStateChangedFunc(Flajaxian.fileStateChanged);
        fu.set_percentageChangedFunc(Flajaxian.percentageChangedFunc);
        fu.set_maxFileNumberReachedFunc(Flajaxian.maxFileNumberReached);
        fu.set_maxFileSizeReachedFunc(Flajaxian.maxFileSizeReached);
        fu.set_maxQueueSizeReachedFunc(Flajaxian.maxQueueSizeReached);
        fu.set_positionFilesListFunc(Flajaxian.positionFilesList);
        fu.set_renderFilesListFunc(Flajaxian.renderFilesList);
        fu.set_strings({maxFileNumberReached:'The maximum number of files allowed to be selected of \'2147483647\' has been reached.',maxFileSizeReached:'The maximum allowed file size of \'999GB\' has been exceeded.',maxQueueSizeReached:'The maximum allowed size of \'999GB\' for all the files in the queue has been exceeded.'});
        fu.set_openedArrowUrl("/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMuPoC5_4uvtMqJkhGeZ5SQe_hMJxBPSWxr9Bl7hU2gOu5JXwwxI0pRKmRNIBeT2wno1&t=633689096480227368");
        fu.set_closedArrowUrl("/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMuPoC5_4uvtMqJkhGeZ5SQeLzgkGcfQD5EuVb3AiQ4iXK5uxbhkx8xh29paEP3X_E41&t=633689096480227368");
        fu.set_closeBtnUrl("/Testing/WebResource.axd?d=Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMuPoC5_4uvtMqJkhGeZ5SQe8mm08ZeWu-zpElqLrjoXoghJdT0OK6mtF13Ya5DNt_A1&t=633689096480227368");
        fu.set_flashWidth(251);
        fu.set_flashHeight(40);
        fu.set_uploadRequiresJsConfirmation(false);
        fu.set_clearListAtEnd(true);
        fu.initialize();
    }
    fu1_EmbedFlash();

</script>


I also enabled the Flash debugger (ServerTracer.swf), which generated this:
2)[2009-2-19 12:9:1.466]
-------------------------
doInitialize
Object type is: [Object]
Object content is:
{
    initiallyInvisible: "false",
    d: "Px451Sl_y6lSAvL-LGfyQpCN4KuB1PtZB_21zHztrMvB2TjzjQzgEAtYi9G9ipaj2q_Q21VN-jK_SFRsTqfTwRynyXBUgKWDDdy7CQF3zdE1",
    clearListAtEnd: "true",
    id: "fu1",
    maxFileQueueSize: "1072668082176",
    debug: "true",
    isIE: "true",
    uploadRequiresJsConfirmation: "false",
    t: "633689096480227368",
    maxFileSize: "1072668082176",
    enabled: "true",
    targetUrl: "http://localhost/Testing/fileuploader.aspx?__ID=fu1_(!AMP!)___AspCookie.Session=yht3pdvjoz3u2255s2ftaibx_(!AMP!)___AspCookie.Auth=805B4AD2ED4E7CE6B972559247445D875C1362D2E3AEF37B28B814538FF89F2AD4CD168E8FD3EA5F6FD0A8F30B3491975D326F1E15A8A2E2120F3B509A45239F_(!AMP!)_",
    maxFileNumberLimit: "2147483647"
}
-------------------------

1)[2009-2-19 12:9:1.451]
CALL to JavaScript:fu1_MarkInitialized()

In this example the upload as well as the file saving is successful, despite the js error (because the upload is solely executed by Flash).
But in our application, the FileUploader is part of a form. Therefore, the upload is initiated in javascript by calling uploader.startUpload().
While testing on IE6, this call does not happen at all. The last call registered on the Flash debugger is 'onFilesSelected'. This js error is unique to IE6. The form works great on IE7.


Any ideas would be appreciated.
Thanks!
Coordinator
Feb 19, 2009 at 4:13 PM
Hi Eelis,

I just tested it with IE 6.0.2900.2180.xpsp_sp2 

I see no javascript error at all. The file is uploaded well. I used exactly your code. My flash player is 9.

Are you sure you don't have some very old version of the FileUploader? May be ActiveX disabled? Can you see Flash movies?
Coordinator
Feb 19, 2009 at 4:18 PM
I think that a problem like that can occur if you have damaged Flash Player. I know that some programs try to install a hacked FlashPlayer on your computer and this replaces the original one. I had that once when I bought a CD with images.
Feb 19, 2009 at 7:59 PM
Thank you for your replies.
This error definitely looks odd and very annoying, but it was reproduced on at least two different machines (XP+IE6).
The FileUploader version is 2 (can't check the revision number as I'm not at the office, but it was downloaded at the beginning of this month).

I'll check the Flash player installation more in depth when i'm back at the office (monday).

Thanks a lot!

Coordinator
Feb 20, 2009 at 4:21 AM
So I have tested it on 2 separate computers
1.) IE 6.0.2900.2180 Flash Player 9
2.) IE 6.0.2900.5512 Flash Player 10 

Whith exactly the code you submited (I assume you don't have any code behind). I detect no JavaScript error and upload is performed without problems.

One possibility that I can think of is that you have altered the source code or you use swfobject of different version on the same page?
Feb 23, 2009 at 3:16 PM
It seems like the error was due to an old version of Flash player. The updated version (10) does execute well.
In case you want to test it further, the configuration that caused the js error included:
IE version: 6.0.2800.1106.xpsp2.050301-1526
Flash Player version: 9.0.28.0
The code was just as I posted it here. No code behind or any other swfobject.

Thanks again for the assistance.