cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Opening PDF documents using toggle buttons

No ratings

PDFs can be linked to experiences using a few methods. Below is an example of using the toggle widget or a toggle button to open and close a PDF within your experience. 

 

 

 

2019-08-29_16-02-06.jpg

 

Example of JavaScript code to add to Home.js file:

 $scope.toggleButton = function() {
    //if  the toggle is pressed
if ( $scope.view.wdg['toggleButton-1']['pressed']==true) {
      
     window.location='app/resources/Uploaded/%5BBD-Logbuch%5D20190208-20190310.pdf'
     console.log($scope.view.wdg['file-1']['url'])
   }
//unpress the toggle button after 1,5 sec
   $timeout(function () { $scope.view.wdg['toggleButton-1']['pressed']=false;}, 1500); 
 }

 

 

 

Version history
Revision #:
1 of 1
Last update:
‎11-01-2019 03:35 PM
Updated by:
 
Labels (2)