Flash error when loading multiple documents

63 views
Skip to first unread message

ch...@cwfent.com

unread,
Sep 12, 2013, 12:09:36 PM9/12/13
to pdfnet-w...@googlegroups.com
Hi,

I have a list of documents displayed by jstree and when you click a doc it loads in the viewer. Everything is fine in HTML5 but  in flash I can only load 1 document and then any other attempts fail. If I refresh the browser then the process repeats (I can view one but not any others). I've cleared cache, cookies, active connections, restarted browser and computer etc and the results are repeatable each time.

The errors I get every time I click on a document after the first time are:

Script Block:

return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));


Which is in the function

function __flash__addCallback(instance, name) {
  instance
[name] = function () {
   
return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
 
}
}

Then right after

Could not complete the operation due to error 80020101.

Which is in jquery itself

a
.execScript||function(b){a.eval.call(a,b)})(b)


I'm using Webviewer all over the place and don't have this problem elsewhere so I'm assuming webviewer and jstree are not playing together well but prior to webviewer I was pulling in a different flash viewer based on swfobject so I was hoping that this would work.

TIA

Ryan - PDFNet Developer

unread,
Sep 12, 2013, 7:48:40 PM9/12/13
to pdfnet-w...@googlegroups.com
To clarify, everytime you want to load a new document with Flash, you (re)load the entire SWF file into the webpage?

If so, have you tried re-using the swf file? This is well tested and should work fine. Loading the webviewer.swf multiple times has not. Are you unloading the first SWF file, and if so, how?

If not, then can you please explain in more detail how you are loading the second document?

Regards,
Ryan

ch...@cwfent.com

unread,
Sep 13, 2013, 9:36:19 AM9/13/13
to pdfnet-w...@googlegroups.com
The xod I do Ryan. jstree displays a tree of links which binds the click of a link to a ajax call when then returns

            <script type="text/javascript">    
                $
(function() {    
                   
var viewerElement = document.getElementById('viewer');    
                   
var myWebViewer = new PDFTron.WebViewer({    
                        type
: typeorder,
                        initialDoc
: "pathtoxod"    
                   
}, viewerElement);    
               
});
           
</script>

Which we then put in a div.

I got it working though, I changed jstree from ajax to using a iframe and then added everything to that and the error went away. So maybe it was asynchronous js issue between the viewer and jstree or something? I guess in this case I can live with a iframe :)

Thanks
Reply all
Reply to author
Forward
0 new messages