close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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 | 259 views | 2 replies |

MagsW

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>
</p>
</form>

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

Sign in to reply to this post

Jason ByrnesWebAssist

This is going to take hand coding to accomplish that is not supported throw the forums.
we can help you implement this through a premiere support appointment:
http://www.webassist.com/premier_request.php

Sign in to reply to this post

MagsW

Hi Jason

I managed to solve the problem by coming at it from a different angle - I made a form with hidden fields to pass the value and timestamp to the database and a Submit button with a value of "Generate PDF". On submit, it then displays the actual download link along with a message saying "PDF generated on [date, time} in a field using a Show If to only show it when the value in the dB is "1". It means that when the user revisits the page, they can see that they already generated a PDF and when.

Thanks anyway!

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...