| Server Deployment | HTML Templates |
| Template Directives | Configuration File |
| The Users Database File | Concatenated and Grid Questions |
| Questionnaire Directives | Online Data Analysis |

| HTML Template | Purpose | Sample System Only? | Optional? |
|---|---|---|---|
| dkwsalogin.htm | Survey Login Screen | No | Yes |
| dkwebserve_adv_tpl.htm | Survey Question Screen | No | Yes |
| dwsa_completed.htm | Survey Already Completed Screen | No | Yes |
| dwsafrontscreen.htm | Sample System Front Screen | Yes | No |
| dwsa_splexhaust.htm | Sample Exhausted Screen | Yes | Yes |
| dwsa_splcancel.htm | Sample Cancelled Screen | Yes | Yes |
| dwsa_appointment.htm | Appointment Screen | Yes | No |
| dwsa_giveup.htm | Give Up Screen | Yes | No |
<HTML><HEAD><TITLE>_SURVEYNAME_ Login</TITLE></HEAD> <BODY BGCOLOR=#CE9B38> <H2>_SURVEYNAME_ Login</H2> <H3>_PROMPT_</H3> <FORM NAME="dkwsalogin" METHOD="POST" ACTION="_EXECUTABLE_?_QUERY_"> <TABLE CELLPADDING=2 CELLSPACING=3 BORDER=1 BGCOLOR="#D0E0D0"> <TR><TD><B>User Name :</B></TD><TD><INPUT TYPE=text NAME="username" SIZE=40 MAXLENGTH=40 VALUE="_USERNAME_"></TD></TR> <TR><TD><B>Password :</B></TD><TD><INPUT TYPE=password NAME="plywood" SIZE=40 MAXLENGTH=40></TD></TR></TABLE><BR> <INPUT TYPE=SUBMIT NAME="SUBMLOGIN" VALUE="Login"> </FORM></BODY></HTML>The login screen template must have the SUBMLOGIN, username and plywood inputs on its form, and the form must be called dkwsalogin.
| Directive | Substituted for | Valid in |
|---|---|---|
| _DKQUESTIONSECTION_ | HTML Table Containing the Questions and Answers | dkwebserve_adv_tpl.htm |
| _PROMPT_ | Login Screen Prompt | dkwsalogin.htm |
| _SURVEYNAME_ | The Name of the Survey | Any Template |
| _LICENSEE_ | Organisation DKapture is Licensed to | Any Template |
| _DKWSADATE_ | Today's Date | Any Template |
| _DKWSATIME_ | Current Time | Any Template |
| _QUERY_ | Everything after the ? in the URL | Any Template |
| _HOST_ | Name of the Host for this Session of DKWebServe_Adv (eg. www.critical.co.uk) | Any Template |
| _EXEDIR_ | URL to the Directory Housing the DKWebServe_Adv Executable (eg. http://www.critical.co.uk/scripts/) | Any Template |
| _EXECUTABLE_ | Full URL Path to DKWebServe_Adv Executable (eg. http://www.critical.co.uk/scripts/dkwebserve_adv.cgi) | Any Template |
| _USERNAME_ | Login Name | Any Template |
| _APPSCAPTION_ | Details of the Next Appointment | Any Sample Template |
| _TICKETNO_ | Session Pass Key | Any Template |
| _LASTERROR_ | The last reported problem with the survey | Any Template |
| _SERNO_ | Serial Number of the Current Survey | Any Template Except Login |
| _INTNO_ | Interviewer Number | Any Template Except Login |
| _GIVEUPOPTIONS_ | A List of "Give Up" Options | Any Sample Template |
| _Sample Fieldname_ | Whatever the Contents of "Fieldname" are, from the Sample File | Any Sample Template |
<HTML>
<HEAD>
<STYLE TYPE="text/css">
EM { background-color:black; color:white; font-style:normal;}
BLINK { background-color:blue; color:yellow;}
SMALL { font-size:smaller;}
SAMP { display:none;}
</STYLE>
<TITLE>Survey _SURVEYNAME_</TITLE>
</HEAD>
<BODY>
<CENTER><H2>Survey _SURVEYNAME_</H2></CENTER>
_DKQUESTIONSECTION_
<SCRIPT Language="Javascript">
// qid is the ID of the control. This is either the label of the question for numerics and alphas,
// or zXXXopQQQ for singles and multis, where XXX is the (zero-padded to a width of 3) option number,
// and QQQ is the question label. Question labels (QQQ) are always UPPERCASE.
// Use changeop(qq,ops,chg) to enable, disable, check or uncheck any options in the string ops for question qq
// chg should be 1 to disable, 2 to enable, 3 to check, 4 to uncheck, 5 to make invisible and 6 to make visible
// the comma-separated option numbers in ops.
// Use getqlbl(qid) to get the question label from the control id qid.
// Use getanswer(QQQ) to get answer(s) for question label QQQ. For example :-
// document.getElementById(qid).style.backgroundColor='yellow'; [Sets background of element qid to yellow]
// document.getElementById('q3tbl').style.display='block'; [Makes section ID'd by 'q3tbl' visible]
// changeop('Q1','2',1); [Makes option 2 of single or multi question Q1 disabled]
// changeop('Q2','1,3,5',3); [Checks options 1,3,5 of multi question Q2]
function blurd(qid)
{
// Put code after this line to do something when a question loses focus
return true;
}
function fcusd(qid)
{
userinput(getqlbl(qid));
// Put code after this line to do something when a question gains focus
return true;
}
function mseover(qid)
{
// Put code after this line to do something when the mouse pointer enters the region of a control.
return true;
}
function mseout(qid)
{
// Put code after this line to do something when the mouse pointer leaves the region of a control.
return true;
}
function userinput(qq)
{
// Put code after this line to do something whenever the question screen is changed or first shown
// qq is the label of the question that changed
return true;
}
</SCRIPT>
</BODY>
</HTML>
The routines changeop, getqlbl, and getanswer are defined in the dkwsafuncs.js
support script which is included in every question screen generated by DKWebServe_Adv.
.cnc0.
{CONCAT}
1)
2)
)
[0]
.Q0.
Please choose the company you used from the list below, or code 'Other Company' and input the name for yourself :-
1)Xerox
2)Jaeger
3)Kleenex
4)Teac
5)Panasonic
6)Apple
7)Vauxhall
8)Polydor
9)Nabisco
10)Royal Doulton
11)Arriva
12)Other Company
.QTXT.
{TABLE ID="txtbl" STYLE="display:none;"}
80)Please Enter the Company Name Below :-
[alpha]
Note the use of STYLE="display:none;" to make the table containing the alpha question
initially invisible. Then, we hook into the userinput routine with the following Javascript code :-
function userinput(qq)
{
// Put code after this line to do something whenever the question screen is changed or first shown
// qq is the label of the question that changed
var txb=document.getElementById('txtbl');
if (!txb) return true;
if (getanswer('Q0')=='12') { txb.style.display='block'; document.getElementById('QTXT').focus();}
else txb.style.display='none';
return true;
}
Note the use of document.getElementById to obtain a handle to the invisible table in
order to change its visibility, and to put the text entry box into focus when necessary.
Additionally, singles and multis have IDs that envelope the actual checkbox or radiobutton
they refer to. For example, 'z003opQ0' would refer to the checkbox or radiobutton for
option 3 on question Q0, 'LBLz003opQ0' would refer to the checkbox or radiobutton and
the text next to it (this element does not exist if the single or multi is part of a
{GRID...} question), and 'TDz003opQ0' would refer to the entire cell in
the table used to hold the checkbox or radiobutton and associated text. An example that
highlights the option the mouse is over in yellow and renders it back to the document
background colour when the mouse leaves it, for the above example questionnaire text might be :-
var obgc=document.bgColor;
function mseover(qid)
{
// Put code after this line to do something when the mouse pointer enters the region of a control.
if (qid.indexOf('op')!=-1) qid='LBL'+qid;
document.getElementById(qid).style.backgroundColor='yellow';
return true;
}
function mseout(qid)
{
// Put code after this line to do something when the mouse pointer leaves the region of a control.
if (qid.indexOf('op')!=-1) qid='LBL'+qid;
document.getElementById(qid).style.backgroundColor=obgc;
return true;
}
Note how the qid parameter is prefixed with 'LBL' when 'op' is in the ID string
(ie. you are on a single or multi), to correctly address the radiobutton and the text next it.
Also, note the use of var to set up a variable obgc to hold the document
background colour.
<TABLE ID="tbl1" STYLE="background-color: peach;">and we want to change the colour to coral when one of the Javascript event handlers is fired, we would use :-
document.getElementById('tbl1').style.backgroundColor='coral';
As you can see, the 'background-color' parameter of the STYLE HTML attribute, when referred to
in Javascript, is called 'style.backgroundColor'. For all such translations,
a full list is here.
* Compiled and Data File names separated by semi-colon * Use "Default" or "DefaultDat" for names based on the survey name Default * Email Return Address, Host and Username details (comma-separated) me@myorg.co.uk,smtp.freeserve.net,myusername * Button Back Text (Use "None" for no button) * If this is a URL or Filename to an Image file, an image button will be used Back * Button Back Alt Key @ * Button Forward Text * If this is a URL or Filename to an Image file, an image button will be used Next * Button Forward Alt Key @ * Display full question details on each screen (Yes or No) No * Display "Characters Remaining" on verbatim questions (Yes or No) Yes * Progress Bar * Use </TD></TR></TABLE> for no progress bar * Use %a% for %ge thru and %b% for %ge left </TD><TD align=right valign=center>Progress: %a%% done</TD></TR></TABLE> * Survey Completion URL or File (Use "None" for default screen) None * Main Question Table Definition <TABLE height=375 cellSpacing=0 cellPadding=5 width=95% border=1> * Answers Table Definition <TABLE cellSpacing=0 cellPadding=3 width=95% border=0> * Buttons Table Definition <TD valign=bottom align=left height=1><TABLE width=100%><TR><TD width=*> * Number of Columns for Answers (minimum 1, maximum 20) 2 * Number of Codings Before Multicolumn is Used (0 for all) 10 * Confirm a New User (Yes or No) Yes * User List * Open - New user names AND passwords can be entered by the respondent. * Closed - User names AND passwords must be on the database. * Auto - User names will be generated (6-random alphabetic chars) and, * optionally, overwritten by the user. No password is required. * Useronly - Like a Closed list, but no password is required. * Usersetpw - User names have to be in the users database. * Password is required but, if blank, can initially be set by the user. * OneHit - User names will be generated (20-random alphabetic chars) * but the respondent doesn't see it and, therefore, can't change it. Open * Email errors/problems to address :- * If following has @ in it, it will go there, else nothing is emailed. * If you use "display" it will show technical details in the browser Nobody * Login Screen Prompts * Please Login Please Login * Unable to Open Login Database - Please try again Unable to Open Login Database - Please try again * Incorrect Password - Please Re-enter Incorrect Password - Please Re-enter * Username not Recognised - Please Re-enter Username not Recognised - Please Re-enter * Please Confirm New User Details Please Confirm New User DetailsCompiled and Data File can be specified here. Please use a semi-colon to separate the compiled file name from the data file name. If you use "Default", it will set the compiled file name to whatever the survey name is plus a .cpd extension, and name the data file likewise, with _DAT.DBF for its ending. If you use "DefaultDat", it will set the compiled file name to whatever the survey name is plus a .cpd extension, and name the data file likewise, with .DAT for its ending.
.qg1.
{CONCAT}Let's <B>Grid</B> this one up now :-
1)
2)
3)
[0]
.qg2.
{GRIDHEAD aqua,silver,width=50px,width=50px align=center}Which countries have you been to?
1)Turkey
2)Cyprus
3)Spain
4)Brazil
5)Laos
6)Iceland
)
[-6]
.qg3.
{GRID}Which have you yet to visit?
)=qg2
[-6]
.q1.
{GRID}Please select a representative code
2000)reps.cfg
you would see something like :-
Let's Grid this one up now :-
| ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
&cpd=compiled file &dat=data file &un=username &pw=passwordThese should be fairly self-explanatory and allow for multiple compiled and data files in the same analysis directory on the server.
| Field Name | Field Type | Length | Description |
|---|---|---|---|
| USERNAME | Character | 50 | Login name. |
| PASSWORD | Character | 50 | Login password. If this field is blank, the first password used by this user is encrypted, stored in here, and used for future logins. |
| USERCLASS | Character | 20 | The level of user. If "Administrator", then more technical information is shown on the screen. |
| FILESUSED | Memo | - | A list of intermediate temporary files used by the system on the server during any session. These are deleted when the user logs out, or the session times out after 30 minutes of inactivity. |
| HISTSLOT | Numeric | 8 | As the user defines and generates filters, tables, charts and listings, a history is built up which the user can go back into if necessary. This number represents how deep their history trail is. |
| LOGINDATE | Date | 8 | Last login date. |
| LOGINTIME | Character | 8 | Last login time. |
| IPADDRESS | Character | 30 | Last login IP address. |
| USERNOTES | Memo | - | Spare field for notes about the user. |
| CURFILTER | Memo | - | The current filter expression in use on the data. |
| QSIDE | Numeric | 10 | Question number of the chosen side variable. |
| QBREAK | Numeric | 10 | Question number of the chosen break variable. |
| QTBLREQD | Numeric | 3 | 1 - Table Required, 2 - No Table. |
| QCHART | Numeric | 3 | Chart type: 1 - Pie, 2 - Bar, 3 - Horizontal Bar, 4 - No Chart. |
| QTHREED | Numeric | 3 | Chart perspective: 1 - 3-Dimensional, 2 - Flat. |
| QSIDEPCTS | Numeric | 3 | 1 - Counts Only, 2 - Counts and Column Percentages, 3 - Column Percentages Only. |
| QCHWID | Numeric | 4 | Chart Width in screen pixels. |
| QCHHEI | Numeric | 4 | Chart Height in screen pixels. |
| SHOWRPTOPS | Character | 9 | Denotes the visibility of the report listing options section. |
| SHOWADVOPS | Character | 9 | Denotes the visibility of the advanced options section. |
| CURROPS | Character | 80 | The name of the last loaded/saved report. |
| CHTBGCOL | Character | 30 | Chart start background colour. |
| CHTBGCOL2 | Character | 30 | Chart end background colour. |
| PIECUTOFF | Numeric | 4 | The percentage below which slices are grouped into an "Other Values" slice (default 0 - all slices detailed). |
| BARTYPE | Numeric | 3 | Type of bar used: 1 - Solid 2 - Cylinder 3 - Arrow 4 - Gradient Fill 5 - Ellipse 6 - Pyramid 7 - Inverted Pyramid |
| BRKDETAIL | Numeric | 3 | Bar Layout on Multi-Dimensional Bar Charts: 1 - SIDE BY SIDE - plot separate bars next to each other 2 - STACKED - stack the bars on top of each other 3 - STACKED "100%" - stack the bars on top of each other and scale them 4 - BACK TO FRONT - plot separate bars in a 3-D perspective from back to front 0 - No Detail |
| BARWIDTH | Numeric | 4 | The percentage of the column width occupied by a bar (default 70%). |
| LEGENDPOS | Character | 9 | Legend position: right, left, top, bottom, or invisible |
| LABELSIN | Character | 2 | Labels Inside Bars/Segments? (Y means yes) |
| QVERB | Character | 200 | Comma-separated list of verbatim question numbers for questions to appear in a report listing. |
| QNONVERB | Character | 200 | Comma-separated list of non-verbatim question numbers for questions to appear in a report listing. |
| QJUSTCODES | Character | 2 | Non-Verbatim Codes Instead of Texts? (Y means yes) |
| RCSPERPAGE | Numeric | 4 | Number of records per page on report listings. |
| DIRECTRIX | Character | 20 | Last action performed (internal use). |
| BGRNDFILE | Character | 90 | Name of the image file used to tile the background for the session. |
| HILITCELLS | Memo | - | !-delimited cell coordinates for highlighted cells. |
| BANDING1 | Character | 200 | Banding used for the current side variable numeric. |
| BANDING2 | Character | 200 | Banding used for the current break variable numeric. |
| REPORTHDR | Character | 2 | Output question label key at top of each page on report listings? (Y means yes) |
| XPLODE | Character | 2 | Explode largest pie slice on pie charts? (Y means yes) |
| OUTPUTTO | Numeric | 3 | Output report listings or table/charts to: 1 - Microsoft Excel Spreadsheet 2 - Microsoft Word Document 3 - Microsoft Powerpoint Presentation 4 - PDF Document 0 - Web Browser (Default) |
| QBLANKRECS | Character | 2 | Output blank records? (Y means yes) |
| INCDKCODES | Character | 2 | Include dkapture codings in tables/charts? (Y means yes) |
| INCSDBLANK | Character | 2 | Include blank rows in tables/charts? (Y means yes) |
| INCBRBLANK | Character | 2 | Include blank columns in tables/charts? (Y means yes) |
| HYPERLNK | Character | 230 | The hyperlink to associate with the cells in a table - see the documentation for HYPERLINK |
| CATEGORIES | Memo | - | The report visibility categories for this user. Put each category name on a new line. These appear in the Report Visibility dropdown list and enable reports to be shared across users with the same categories as each other. You can save a report into a certain category, and any user that has that category in this field, will be able to select that category and load that report. |
| Character | 90 | Information only - not used by the online.cgi application currently. | |
| ADDCHTOPS | Memo | - | Additional chart options eg. +flipped (sticky - these options are applied to all output until changed and are only visible to USERCLASS Administrator) |
| ADDPIVOPS | Memo | - | Additional table options eg. DROPCODES (sticky - these options are applied to all output until changed and are only visible to USERCLASS Administrator) |
| LQDATE | Date | 8 | Date of last generated output. |
| LQTIME | Character | 8 | Time of last generated output. |
| Mnemonic | Substituted for |
|---|---|
| _SYSTEMNAME_ | "Critical Research Online Analysis System". |
| _SURVEY_ | Survey Name (Directory where the files are!). |
| _LICENSEE_ | The company name stored in the licence file on the server running the online system. In the case of www.critical-surveys.co.uk it is "Critical Research". |
| _DATE_ | Today's date in the format used by the server for short dates. |
| _TIME_ | The time in the server's time format (as appears in the taskbar clock). |
| _QUERY_ | Everything after the question mark in the URL used to run online.cgi |
| _USERNAME_ | The username used to logon to this session. Same as _USER.USERNAME_ |
| _USERTITLE_ | Whatever is held in the USERCLASS field for this user. Same as _USER.USERCLASS_ |
| _TICKETNO_ | Internal security number used to maintain a "session" after logon. |
| _HOST_ | The name of the host that houses this server, eg. "localhost" or "www.critical-surveys.co.uk" |
| _FILTER_ | The currently imposed database expression that filters the data records (usually as a result of drill-down). |
| _FILTERTEXT_ | The currently imposed filter expressed in verbose terms using abbreviated question texts and answer texts. |
| _BASE_ | Gives the string " - Base : xxx" where xxx is the number of records in the current base. |
| _BASENUM_ | Gives the number of records in the current base. |
| _CAPTION_ | Gives a "key" for report listings and table/chart outputs. |
| _SIDEFLD_ | Gives the side variable database field name prefixed with a space. |
| _BREAKFLD_ | Gives the break variable database field name prefixed with a space. |
| _SIDEDESC_ | Gives the first 999 characters of the question text for the side variable. |
| _BREAKDESC_ | Gives the first 999 characters of the question text for the break variable. |
| _QPICKLIST_ | A list of all questions in SELECT (<OPTION>...</OPTION>) format. |
| _APICKLIST_ | A list of verbatim questions in SELECT (<OPTION>...</OPTION>) format. |
| _NPICKLIST_ | A list of non-verbatim questions in SELECT (<OPTION>...</OPTION>) format. |
| _RESULT_ | A set of table rows that define the current table and/or chart. |
| _SAVEDOPS_ | A list of the saved reports for the current user in SELECT (<OPTION>...</OPTION>) format. |
| _RPTVIZOPS_ | A list of the report visibility categories for the current user in SELECT (<OPTION>...</OPTION>) format. |
| _COLOUROPS_ | A list of colours to paint the chart background in SELECT (<OPTION>...</OPTION>) format. |
| _RPTLISTOUT_ | URL to the spawned output when doing a report listing or table/chart output. |
| _RPTFLDLIST_ | This is either the list of semi-colon-delimited fields in a report listing, or "Table/Chart |
| _BGIMAGES_ | A list of background image filenames found in the "online_images" directory off of the cgi-bin or scripts directory on the server. Add more .bmp,.jpg,.jpeg,.gif,.png files to increase your choice of backgrounds for the analysis system pages. |
| _USER.<fieldname>_ | Any field from the users database. <fieldname> should be the fieldname required, for example _USER.ADDCHTOPS_ |
| _EXEDIR_ | The full URL (including the trailing slash) to the directory on the server housing the online.cgi executable. |
| _EXECUTABLE_ | The full URL to the online.cgi executable. |