Click here to Skip to main content
15,893,722 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i'm working in MVC4 we are using 3'rd party plugin to view documents(jpeg,pdf) in screen that works fine in chrome,firefox and IE10 and IE11 but it produces Script error 1028 for IE9 and IE8 

JavaScript
documentViewer = new DocumentViewer({

           handlerUri: "DocumentViewer.axd",
           id: 'document-viewer',
           renderingDpi: 196,
           renderFormat: "jpeg",
           preferences: {
               toolbarVisible: true,
               visibleNavigationControls: {
                   firstPage: true,
                   prevPage: true,
                   nextPage: true,
                   lastPage: true,
                   pageIndicator: true,
                   gotoPage: true,
               }
               ,
               visibleZoomControls: {
                   fixedSteps: true,
                   zoomIn: true,
                   zoomOut: true,
               }
               ,
               visibleFileOperationControls: {
                   downloadAs:false,
                   open: false,
                   download: true,
                   print: false,
               }
           }
          ,
           events: {
               beforePageChange: function (currentPage, newCurrentPage, cancel) {
               },
               afterPageChange: function (currentPage) {
               },
               beforeZoomChange: function (zoomPercentage) {
               },
               afterZoomChange: function (zoomPercentage) {
               }
           }
       });


i'm getting error in the following line  
gotoPage: true,
},
Please anyone can help me
Posted

1 solution

Just remove the comma (,) after the last property attributes for visibleNavigationControls, visibleZoomControls and visibleFileOperationControls

gotoPage: true

zoomOut: true

print: false
 
Share this answer
 
v3
Comments
sankarisiva 3-Jul-15 3:35am    
Even if i remove comma the same error is occur
Sreekanth Mothukuru 3-Jul-15 4:01am    
Try debugging the code. Check to see if commas appear or not. Clear the cache and check again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900