Thread: poxy javascript
View Single Post
Old 03-07-2003, 11:23   #1 (permalink)
the_purple_ostrich
Registered User
 
Join Date: Mar 2003
Posts: 64
Send a message via Yahoo to the_purple_ostrich
poxy javascript

ok I'm tearing my head out as I need a form with 5 questions with answers yes or no as radio buttons then based on their answers it outputs a peice of text - I haven't a clue on what to write - I've got a kind of scripty thing that of course does nothing but shows what I need... the radio buttons are named question_x_yes or question_x_no - am I on the right lines as I couldn't find any relevant scripts on the net - HELP?!

<SCRIPT LANGUAGE="JavaScript"><!--
function cycle() {
if question_1_yes = "true" & question_2_no="false" & question_3_no="false" & question_4_no="4" & question_5_yes="true" or "false" then
document.write = "option 1"
else
if question_1_yes = "true" & qestion_2_yes="true" & question_3_no="false" & question_4_yes="yes" & qeuestion_5_yes="true" then
document.write = "option 2"
else
if question_1_yes = "true" & qestion_2_yes="true" & question_3_yes="true" & question_4_yes="yes" & qeuestion_5_yes="true" or "false" then
document.write = "option 3"

else
if question_1_yes = "true" & qestion_2_yes="true" & question_3_no="false" & question_4_yes="yes" & qeuestion_5_no="false" then
document.write = "Option 4"

else
document.write "unfortunately we're unable to do anything."

//--></SCRIPT>
  Reply With Quote