473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dynamic survey

I am trying to make a survey with a number of questions in it. To start
with just the first question is shown, with two possible answers.
Depending on which answer is chosen another question will show up when
the user clicks on the radio button. Then, again, with this next
question the same thing would happen.

I have almost got it working. I put each question in a DIV and made
them visible onclick of radio button. The only problem with this is
that when question 2 is answered the next question shows up BUT
question 2 disappears, which i want to stay visible.

I imagine the best way is the have the onclick action of the
radiobutton make two DIVs visible, but with teh code i have it can only
accept one.

Does anyone have any ideas?

Aug 30 '06 #1
1 1681
chris_huh said the following on 8/30/2006 8:10 AM:
I am trying to make a survey with a number of questions in it. To start
with just the first question is shown, with two possible answers.
Depending on which answer is chosen another question will show up when
the user clicks on the radio button. Then, again, with this next
question the same thing would happen.
I hope there aren't more than 4 or 5 questions then. As your possible
questions is directly - and exponentially - related to how many
questions there are.

8 questions have 256 possible outcomes. That is a lot of questions/DIV's
to be hiding for no apparent reason.
I have almost got it working. I put each question in a DIV and made
them visible onclick of radio button. The only problem with this is
that when question 2 is answered the next question shows up BUT
question 2 disappears, which i want to stay visible.
Then something is obviously wrong in your code. Show a sample page that
you have so far.
I imagine the best way is the have the onclick action of the
radiobutton make two DIVs visible, but with teh code i have it can only
accept one.
Actually, a "better way" would be to have the next elements to show
dynamically created and inserted to containers.
Does anyone have any ideas?
Lots of them. They start at 2.95 USD each. How many can I put you down for?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 30 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: GTF | last post by:
PHP Web Survey Idea.. I have been given an opportunity to create a web based survey. This is a fairly lengthy survey of 60 pages on paper (various multiple choice and free form). These are...
10
by: AdamG | last post by:
I am trying hard for days now to add and delete rows to a table. I could really use some help... Each row contains two buttons (images) - 'add row' and 'delete row'. When the user clicks add...
3
by: Wardeaux | last post by:
All, looking for sample project on how to add/edit/delete controls from an aspx page at runtime... any pointers is most appreciated!! My controls are simple: Label, Textbox, and DropList... I only...
4
by: Bass Pro | last post by:
Hi, I am creating textbox, radiobuttonlist and checkboxlist dynamically depending on data from a table. It is a questionnaire. I add the control on a Panel control during the 1st load_page event....
2
by: Tex | last post by:
I am trying to build a survey application using asp.net 2.0 and c# in visual studio 2005. I am fairly new to asp. I need to find a way to dynamically create a page with all of the survey...
34
by: clinttoris | last post by:
Hello Experts, I have been told to post this in the Javascript forum as I want to do this client side just before my form gets submitted. Once the user clicks the submit button a javascript...
26
by: Jerim79 | last post by:
I need to create a form that takes a number that the user enters, and duplicates a question the number of times the user entered. For instance, if the customer enters 5 on the first page, when...
1
by: Miyagi | last post by:
I am creating a simple "or so I thought" php/mysql survey. There are 3 types of Surveys, with different questions. 1 for Clients, 1 for Employees, 1 for Peers. Questions for each survey are...
0
by: Janet93 | last post by:
If you are involved in the development of scientific computing software, you are invited to participate in a survey on developing this kind of software. If you have already received this request, I...
12
by: ive1122 | last post by:
Hi guys, I am looking into create a dynamic survey as posted in Get User Input From Dynamic Controls but with some different environment Below is what i am trying to do: First when the user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.