Category: ASP

Use ABCpdf to generate pdfs of multi-paged html documents

I maintain a library of learning modules which are constantly under development and revision. Our users often want PDFs to print out or view off-line, but we can’t maintain up-to-date PDF’s of each module manually. We needed a way to make on-demand PDFs of whatever the current state of the module is when the pdf is requested.

After looking at many pdf solutions I settled on “ABCpdf ASP 6.0” by WebSuperGoo.com.

ABCpdf has the advantages of fairly low cost (about $400.00 for one server, or FREE if you link back to them), a better HTML-rendering engine than most, and an easy to learn API, so you can write custom dynamic PDF applications.

Continue reading

Create a search form or quick report in asp

The example code below shows how to set up a form using Dreamweaver and ASP that queries a database based on the value of one or more form fields.

We have a database containing the transcripts of the results of courses taken in our online learning management system. Each online SCORM course has several sections or lessons. This form checks the status and score on each individual lesson, given the user’s id and the course code.

The tables and fields involved are:

Continue reading

Use server-side application variables to drive client-side scripts

You can use serverside variables to drive client-side javascripts. Server-side variables get processed and the results output by the time the page is rendered, so the value of the variable can be used in client-side functions.

In an ASP application I’m working with, I wanted a different tooltip to show up on each tab, depending on what the tab title was. There is a server-side variable called “tabs[i].title”. So I created a little client-side function to test the value of the title on each tab.

 
<script>
var tabName ;

function whichTab(tabTitle){
   if (tabTitle == 'Summary'){
   tabName = Summary;
}
else if (tabTitle == 'Plan Details'){
   tabName = PlanDetails;
}
else if (tabTitle == 'Certifications'){
   tabName = Certifications;
}
else if (tabTitle == 'Transcript'){
  tabName = Transcript;
}
}
</script>
Continue reading