JavaScript is one of the tools we use to develop complex interactive survey applications.
JavaScript is a programming language that is embedded into HTML documents. It controls the rendering of the HTML document and can be used to enhance the functionality of the questionnaire elements. JavaScript can be used for:
Much of our work involves the implementation of customized JavaScripts to support your survey needs. This enables us to develop dynamic and interactive web forms that create a functional and intuitive experience for your survey participants.
Some of the examples below show how JavaScript can be used in questionnaires.
<Form>
<input type=text size=2
onBlur="this.value=(isNaN(this.value))?0:(this.value<0)?0:(this.value>5)?5:this.value;">
</Form>
Enter a values between 0 and 5 in the boxes below.
See what happens if you enter a different value.
For Example:
clr=new Array('yellow','white','silver');
function highlight(state) {
element=event.srcElement;
if(element.tagName=='INPUT') {
etype=element.type;
if((etype=='submit' || etype=='reset') && state==1) state=2;
element.style.backgroundColor=clr[state];
element.focus();
}
}
Additional Resources are at: http://developer.irt.org/script/script.htm