Using Javascript To Turn PDF Forms Into Self-Correcting Assignments -


i teacher , looking @ going paperless possible. learned (through searching here , asking previous question) how use javascript validate pdf form responses on individual basis. believe there ways validate entire form prior submitting it, haven't found out how yet. forms pdf documents, not web pages.

what question deals validation , submission. there way use javascript (or other method) to:

  1. validate entire form (which entire assignment student complete) click of button?
  2. with same click, submit answers , "score" received to, say, spreadsheet? class has website , domain can modify via cpanel handle submissions, if have somehow set there.

ideally, want submission , score, students can't validate, change answers based on validation, submit perfect assignment.

the alternative students fill out form, validate, , have students print out score. issue can see students reloading pdf , changing answers after validation.

any insight or suggestions?

you can add javascript submit button , make display score , submit form field values website.

it not fool proof. javascript error console in adobe acrobat/reader may show leak information javascript code. there several pdf-processing tools can extract javascript code pdfs.

so, best option have simple submit button , have submit form field data server. on server, can have script evaluates submitted form field data , send message adobe reader in form of fdf stream. fdf stream can contain score.

   response.contenttype = "application/vnd.fdf"   response.write "%fdf-1.2" & vbcrlf & _                  "1 0 obj<< /fdf << /status (" & sacroresponse & ") >>      >>endobj" & vbcrlf & _                  "trailer" & vbcrlf & _                  "<< /root 1 0 r >>%%" & vbcrlf 

the above script in classic asp. message (sacroresponse) displayed within adobe reader, not in browser. can adapt script whichever language supported on web server.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -