Creating a
<resource name=resourcename>
|
Inside the resouce object is the form object. Inside the form object is where you can program a new window to control EZSurvey. You can use these objects:
Type - | text, n, number, r, radio, c, checkbox, lr, listrank, lm, listmulti, ls, listsingle, lc, listcombo, w, weighted, hidden, d, date, t, time, section, rt, richtext, image, tb, toolbutton, pt, plaintext, page, password, link |
Besides creating a window to control EZSurvey. You can create new functions with JavaScript that perform tasks in EZSurvey. EZSurvey supports JSDB objects and standard JavaScript, as mentioned above.
<script name=scriptname context="form" menu="1:Function Name">
/* JavaScript code goes here */ </script> |
Where scriptname is the name you want to give your script, Function Name is the name of the function as seen in the EZSurvey menu, and 1 is the number of the menu item where you want to put the Function Name.
File | Edit | Questions | Database | Publish | Analysis | Utilities | Help |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
Other attributes in the script tag are:
<input name=inputname type=Single><text>My question goes here.</text>
<option value='1'>Response one goes here.</option> <option value='2'>Response two goes here.</option> <option value='3'>Response three goes here.</option> </input> |
To create another page, you would write this, where pagetwo is the name of the new page:
<input name="pagetwo" type=page> |
This is an example of how to call the form resource in the .js file. Where resourcename is the name of the resource.
var popup = new Form(resource('resourcename'));
var data = new Record; if (execForm(popup,data)) { } |