CloseDocument javascript issue

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

CloseDocument javascript issue

Post by cramer » Tue Feb 09, 2016 9:48 pm

Hello,

So when I call the java script method DocuViewareAPI.CloseDocument and then proceed to call DocuViewareAPI.PostCustomServerAction it does not work...

The loading indicator shows up but the PostCustomServerAction is never reached server side so I can not execute the code to load a new document...

How can I close the current document and then proceed to open another document?

Thanks,

Marc Cramer

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: CloseDocument javascript issue

Post by Cedric » Wed Feb 10, 2016 2:54 pm

Hello Marc,

I don't understand the link between PostCustomServerAction and loading a document.
Can you please explain what you are exactly trying to achieve so we can understand how to assist?

Thank you

cramer
Posts: 32
Joined: Wed Mar 26, 2014 2:41 am

Re: CloseDocument javascript issue

Post by cramer » Wed Feb 10, 2016 8:21 pm

Hello,

I have a list of thumbnails that are clickable...
Some of them are formats that are view-able (pdf, tif etc) others that need to be downloaded (mp4, xlsx etc)
When the thumbnail is clicked for a view-able it calls a java script function that uses PostCustomServerAction

Code: Select all

function loadDocumentByIndex(index)
{
	DocuViewareAPI.PostCustomServerAction('DocuVieware1', true, 'loadByIndex', index, null, null); 
}
to post back to server so that the file can be loaded via file stream since it is on a share that is not part of the website.
And when you click on a non view-able item I would like to close the current document in viewer.

When I do this and then attempt to click on a view-able item then PostCustomServerAction is never fired...

Thanks,

Marc Cramer

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: CloseDocument javascript issue

Post by Cedric » Thu Feb 11, 2016 7:34 pm

Of the PostCustomServerAction code is never executed server side it is probably because you are missing something.
My bet would be on the event subscription but I can't be sure without having access to the source code.

Could you please provide a standalone application replicating the issue that we can debug so we can investigate this further?

Thank you

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest