0

I've looked and looked, but can't find solution to this exact issue. I have a form that returns a couple of values into the variables _ and _. I'm using those values to update other form values with the 'setfilenameinbox' function. This works fine in both Chrome and Firefox, but the value doesn't get updated in all versions of IE that I've tested with (both 7 & 8).

Would very much appreciate knowing why code won't work in IE.

<script type="text/javascript">

   function setfilenameinbox(uploadname, url){
       document.getElementById("textboxFileName").value = uploadname;
       document.getElementById("FPFileURL").value = url;
   }

   function openFilePicker(){

      filepicker.setKey('***edited out for help***');

      filepicker.pick({
          extensions: ['.pdf', '.jpg'],
          container: 'window',
          services:['COMPUTER', 'DROPBOX', 'GOOGLE_DRIVE'],
            },
            function(FPFile){
                console.log(JSON.stringify(FPFile));

                //upload complete
                setfilenameinbox(FPFile.filename, FPFile.url);
                },
            function(FPError){
                console.log(FPError.toString());
                }
        );
    } 
</script>
4

1 回答 1

3

我认为 IE7 和 8 没有console对象(除非某些库或插件为其提供了对象)。console.log应该在 < IE8 中破坏您的代码。我建议您删除console生产中的命令。

于 2013-07-10T16:47:06.410 回答