Introduction
Bug
{
Document. getElementById ("SWFUpload_0"). SetReturnValue (_ flash _ toXML (SWFUpload. instances ["SWFUpload_0"]. testExternalInterface ()));
}
(E) {document. getElementById ("SWFUpload_0"). SetReturnValue ("<undefined/> ");}
Related code
<Style type = "text/css">. uploadify-</style> <script type = "text/javascript" src = "Scripts/jquery-1.10.2.js"> </script> <link href = "Scripts/uploadify/css/uploadify.css" rel = "stylesheet"/> <script type = "text/javascript" src = "Scripts/uploadify/js/uploadify3.2.1/jquery. uploadify. js "> </script> <link href =" Scripts/JqueryUI/css/redmond/jquery-ui-1.10.4.custom.css "rel =" stylesheet "/> <script type =" text/javascript "src = "Scripts/JqueryUI/js/jquery-ui-1.10.4.custom.js"> </script> <script type = "text/javascript"> $ ("# dialog" autoOpen: width: 400 modal: draggable: resizable: title: "Upload signature sample" position: "center" close: </script>
(Only files in. sign format can be uploaded)
$ ("# Dialog "). dialog ("open" $ ('# btnUpload 'auto': 'buttonclass': 'Some-class' 'buttontext': 'upload sample ''filesizelimit ': '0' 'queuesizelimmit ': 1 'filetypedesc': 'files ''' multi': 'filetypeexists ':'*. sign ''onuploadstart': $ ("# btnUpload "). uploadify ("settings", "formData", {'code' 'swf ':'/Scripts/uploadify/js/uploadify3.2.1/uploadify.swf ''upload':'/Ashx/SampleUp. ashx? Action = mainUpload ''onuploadsuccess ':}
Solution
Method 1
Method 2
close: ($('#btnUpload').length > 0) { $('#btnUpload').uploadify('destroy'); }
{
document.getElementById("SWFUpload_0").SetReturnValue(__flash__toXML(SWFUpload.instances["SWFUpload_0"].testExternalInterface()) );
}
(e) { document.getElementById("SWFUpload_0").SetReturnValue("<undefined/>"); }
Summary