Martijn Martijn - 8 months ago 59
jQuery Question

Is it possible to load another page when you're creating a pdf with tcpdf?

I'm trying to change the page, when you are downloading a pdf. Otherwise you can download a lot of pdfs. I'm trying to make something against the spam.

What I got now: I create a

id
for a
session
. This
session
is named by
idPDF
. I create the
idPDF
by getting the current date and time. When you're creating the pdf, the
idPDF
will go to an online database. When the
idPDF
is found in the online database, then you're no longer able to create a pdf.

Then it will delete a part of the page and create a button with a
php
function
isset
. With this button you can create a new
session
and start creating a new pdf.

But I need to reload the page, before it is giving me this button. So how can I reload the page (that my page can check the id) or start a
javascript
function on the html page(
fadeIn
with
jquery
)?
Does anyone understand my question?

PS: For the output of the pdf, I'm using 'FD'

pps. I'm new with TCPDF

Answer Source

I solved it!

I used a jquery onclick function. It was that simpel.. First I had some problems with the required fields, but I changed it with a function that I used as a filter. I could load another page or button when the function returned true. With the button I could created another session.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download