Magically changing content

  • Thread starter Thread starter Assaf
  • Start date Start date
A

Assaf

Hi all,

I'm programming a survey with multiple-choice responses implemented as radio
buttons. The quirk is that questions should be added or taken out according
to the user's response.

If the user answers "1" to question 7, magically questions 7A, 7B & 7C
should appear under 7A and 'push' the rest of the content down (scenario 1).
If the user then changes the 7 response to "2", 7A, 7B & 7C should disappear
and the rest of the survey questions (8, 9, 10... 20) should shift back up
(scenario 2). If the added or disappearing questions were last in the survey
I'd just toggle visible yes/no but the 'pushing' of the content is what I'm
not sure how to implement.

Can anyone suggest how make the content appear and shift up and down as
needed?

Thanks.

- Assaf

= = = = = = = = = Scenarios = = = = = =

SCENARIO 1
Q5 - 1
Q6 - 4
Q7 - 1
Q7A - 4
Q7B - 2
Q7C - 1
Q8 - 3
Q9 - 4
:
Q20

SCENARIO 2
Q5 - 1
Q6 - 4
Q7 - 2
Q8 - 3
Q9 - 4
:
Q20
 
Assaf

You can use the place holder control or the <div> element to insert the controls dynamically on user selection

Also make sure about the viewstate of the dynamically created objects

Thanks

Ta
 
Back
Top