close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

using a text link as an update record trigger

Thread began 12/04/2014 8:58 am by MagsW | Last modified 12/05/2014 9:47 am by MagsW | 358 views | 2 replies


using a text link as an update record trigger

I have a text link on my page which when clicked converts a dynamic table to a PDF and allows the user to download it (using a plugin from DMXZone). However, I also want that text link to update a database record when clicked so that I can pass a value of 1 into the "Downloaded" column and that will then display a tick icon on the page using a Show If so that the user knows they've already downloaded that document. I've also wrapped the link in a form tag. However, I'm not sure how to construct the Update Record behavior since of course the text link doesn't appear in the trigger list in the dialog box. I wondered if I could use another onClick event like document.form1.submit() in conjunction with the PDF-generating one but I'm not sure if I can use two onClick events together - wherever I put it, it stops the PDF generator from working. The existing code is as follows:

<form action="" method="post" name="form1" id="form1">
<p id="download1"> <a href="#" onClick="generateJSON('red','PDF','../ScriptLibrary/udeJSON.php',[true,'arial',12,'#000','#FFF',false,false,'arial',10,'#000000',false,false,'#FFF',0.3,'#FFF',10,true,'P',true,'Document 1','arial',12,'#FFF',false,false,'L','L',true,'<?php echo $row_WADAclients['ClientName']; ?> Document 1',false, ,true,true,'#FFFFFF'])">Download as PDF</a>

<?php if ($row_WADAclients['Download1'] == 1) { // Show if column... ?>
<img src="../_images/Check-32.png" alt=""/><strong> completed</strong>
<?php } // Show if column... ?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...