Hi !
We have a lot of PDF file that using the Alert Javascript function to notify users about validations (Ex : Wrong date format).
Is there a way to catch somewhere if Alert, Beep or call refering to app variable is been throwed ?
Thanks !
JP
Javascript alert
Moderator: Alex
-
- Site Admin
- Posts: 2397
- Joined: Thu Jul 10, 2008 2:21 pm
Re: Javascript alert
Hello,
https://www.vintasoft.com/docs/vsimagin ... alert.html
For evaluating the functionality in our PDF Editor Demo you need do the following steps:
Yes, you can catch when the alert function is called in JavaScript code of PDF document. For doing this you need override the "alert" method in WinFormsPdfJsApp class:We have a lot of PDF file that using the Alert Javascript function to notify users about validations (Ex : Wrong date format).
Is there a way to catch somewhere if Alert, Beep or call refering to app variable is been throwed ?
https://www.vintasoft.com/docs/vsimagin ... alert.html
For evaluating the functionality in our PDF Editor Demo you need do the following steps:
- Open PDF Editor Demo in Visual Studio
- Open file "PdfDemosCommonCode\DemosCommonCode.Pdf\JavaScript\PdfViewerJsApp.cs" in project PdfDemosCommonCode
- Override the alert method in PdfViewerJsApp class:
Code: Select all
public override int alert(string cMsg, int nIcon, int nType, string cTitle, PdfJsDoc oDoc) { ... }
- Run PDF Editor Demo
- Open PDF document, which calls the alert function in JavaScript code