
Quote from asmat on February 28, 2020, 3:45 amI have a sample app with two pages, my script works perfect on first page but when I change the order of pages, it does not work. u can see it better in the below videos:
first video( work when order of page is first)
second video(not work when order of page become second)
This is my script, it has written under deviceready function:
function createPDF(){ var pdfer = document.getElementById("pdfcode").value; // pdfcode is id of textarea let options = { documentSize: 'A4', type: 'share' } pdf.fromData(pdfer, options) .then((stats)=> console.log('status', stats) ) // ok..., ok if it was able to handle the file to the OS. .catch((err)=>console.err(err)) } document.getElementById("demo").addEventListener("click", createPDF); // demo is id of buttonHow can I solve this problem?
I have a sample app with two pages, my script works perfect on first page but when I change the order of pages, it does not work. u can see it better in the below videos:
first video( work when order of page is first)
second video(not work when order of page become second)
This is my script, it has written under deviceready function:
function createPDF(){
var pdfer = document.getElementById("pdfcode").value; // pdfcode is id of textarea
let options = {
documentSize: 'A4',
type: 'share'
}
pdf.fromData(pdfer, options)
.then((stats)=> console.log('status', stats) ) // ok..., ok if it was able to handle the file to the OS.
.catch((err)=>console.err(err))
}
document.getElementById("demo").addEventListener("click", createPDF); // demo is id of button
How can I solve this problem?

Quote from luishp on February 28, 2020, 2:19 pmHi @asmat, it's very difficult to know what's causing the problem. I normally use the web browser console to locate the problem but, as you are using a PhoneGap plugin not sure how you can debug it. Perhaps this could help:
http://docs.phonegap.com/references/developer-app/debugging/
Hi @asmat, it's very difficult to know what's causing the problem. I normally use the web browser console to locate the problem but, as you are using a PhoneGap plugin not sure how you can debug it. Perhaps this could help:
http://docs.phonegap.com/references/developer-app/debugging/

Quote from asmat on February 28, 2020, 8:08 pmHi luishp, I think it is maybe cause of bootstrap pagination which hide the id of elements that are exist on second page.
The deviceReady function due to security reason maybe does not attach event to the hide elements.
Please take a look to the attachment, I think the problem that are in the attachment maybe similar with above one.
Hi luishp, I think it is maybe cause of bootstrap pagination which hide the id of elements that are exist on second page.
The deviceReady function due to security reason maybe does not attach event to the hide elements.
Please take a look to the attachment, I think the problem that are in the attachment maybe similar with above one.
Uploaded files:
Quote from luishp on February 28, 2020, 9:59 pmHi @asmat, although there is a limited posibility to modify them with NeoScript commands, objects in different pages than the current one are not accesible. So you can't assign a click event to a buttom from another button located in a diferent page.
I think this is the way AngularJS works (not BootStrap).
Sorry!
Hi @asmat, although there is a limited posibility to modify them with NeoScript commands, objects in different pages than the current one are not accesible. So you can't assign a click event to a buttom from another button located in a diferent page.
I think this is the way AngularJS works (not BootStrap).
Sorry!