H
Harlett O'Dowd
please forgive and be kind to this call for help.
I'm trying to script a web survey and I'm not having any luck.
Specifically, the survey is composed of eight questions (two will be
given in the sample below) and the possible responses are:
a) approve the measure
b) no opinion
c) object to the measure.
I am trying to create a function script whereby if the user chooses
(c) object, he had to elaborate on that by choosing one of four
possible flavors:
a) the project is not sound
b) the project duplicates a previous project
c) the project is not needed
d) other - which gives the user a text screen in which s/he can
explain his/her objections.
This is what I have scripted:
<SCRIPT>
function verify(){
f = document.survey;
if ( prop-one.radio value == Object || object-one.value == 0 ) {
alert('Please tell us why you object to Proposal #1, "Advanced
Metering Initiatives (AMI) Applications for Power Delivery".');
f.object-one.focus(); return false;
}
if ( prop-two.radio value == Object || object-two.value == 0 ) {
alert('Please tell us why you object to Proposal #1, "Advanced
Metering Initiatives (AMI) Applications for Power Delivery".');
f.prop-two.focus(); return false;
}
return true;
}
</SCRIPT>
anything immediately jump out and scream "idiot!" at you? (and yes,
"Object" is capitalized in the code - should it?)
Thanks in advance.
I'm trying to script a web survey and I'm not having any luck.
Specifically, the survey is composed of eight questions (two will be
given in the sample below) and the possible responses are:
a) approve the measure
b) no opinion
c) object to the measure.
I am trying to create a function script whereby if the user chooses
(c) object, he had to elaborate on that by choosing one of four
possible flavors:
a) the project is not sound
b) the project duplicates a previous project
c) the project is not needed
d) other - which gives the user a text screen in which s/he can
explain his/her objections.
This is what I have scripted:
<SCRIPT>
function verify(){
f = document.survey;
if ( prop-one.radio value == Object || object-one.value == 0 ) {
alert('Please tell us why you object to Proposal #1, "Advanced
Metering Initiatives (AMI) Applications for Power Delivery".');
f.object-one.focus(); return false;
}
if ( prop-two.radio value == Object || object-two.value == 0 ) {
alert('Please tell us why you object to Proposal #1, "Advanced
Metering Initiatives (AMI) Applications for Power Delivery".');
f.prop-two.focus(); return false;
}
return true;
}
</SCRIPT>
anything immediately jump out and scream "idiot!" at you? (and yes,
"Object" is capitalized in the code - should it?)
Thanks in advance.