ASP Survey - Skipping Questions

This is a discussion on "ASP Survey - Skipping Questions" within the Classic ASP section. This forum, and the thread "ASP Survey - Skipping Questions are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 9th, 2006, 14:05
New Member
Join Date: Dec 2005
Age: 24
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ASP Survey - Skipping Questions

Hi guys. I have been creating an ASP survey based on an open-source survey by Guo Xu from planet source code. anyway, it is basically a multiple choice survey where users firstly enter their details, and then answer a series of multiple choice questions. You can see this here http://www.beaniekids.com/test/bkq2/user_details.asp . This survey uses an Access database which can be downloaded here: http://www.beaniekids.com/test/bkq2/survey.mdb

My Question is, How can i skip questions....

For example, the first question asks if a user is male or female.
If they answer MALE i want it to skip to Question 3 instead of going to Question 2. How can this be done. i have tried a number of times but cant seem to do it...

i have attached the text asp files for The questionnaire (which is one page that displays each question). i have also attached the proceed and tally asp text files which are called after each question is answered (if you need any more files let me know and ill post up).



And finally, one last question, is there a way to check if a user has answered a previous question. for example, right now i can go from Question 1 to Question 5 simply by changing the url in my browser to from .../p2_questionnaire.asp?QC=1 to ...//p2_questionnaire.asp?QC=5 < how can i prevent this kind of unwanted question skipping. Thanks
Attached Files
File Type: txt p2_questionnaire.txt (3.7 KB, 34 views)
File Type: txt tally.txt (686 Bytes, 36 views)
File Type: txt proceed.txt (919 Bytes, 48 views)
Reply With Quote

  #2 (permalink)  
Old Aug 9th, 2006, 17:52
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,650
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
Re: ASP Survey - Skipping Questions

answer is here:
http://forums.aspfree.com/showpost.p...88&postcount=2
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #3 (permalink)  
Old Aug 9th, 2006, 23:49
New Member
Join Date: Dec 2005
Age: 24
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP Survey - Skipping Questions

yes well i accidently clicked that response as the answer. i am unable to get it to work still so was hoping for soem help
Reply With Quote
  #4 (permalink)  
Old Aug 10th, 2006, 08:21
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,650
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
Re: ASP Survey - Skipping Questions

What have you done so far?
You can't just expect people to get the system you're using, set it up on their own machines, find out how it works, produce your desired effect and then post back....

That answer tells you the method you should use.
How have you decided to implement it? Have you done anything at all?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #5 (permalink)  
Old Aug 10th, 2006, 09:58
New Member
Join Date: Dec 2005
Age: 24
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP Survey - Skipping Questions

Theres no need to get angry. I am extremely new to ASP, and forums are a place where experts connect. I do not think there is anything wrong with posting such a problem here in hope of a solution.

in answer to your question i have implemented most of this system already here: http://www.beaniekids.com/test/bkqf/...stionnaire.asp

i just cannot get the question skipping to work. i want the survey to automatically skip certain questions based on the previous answer. for example if they answer Question 3 'Male', i want the survey to go to Question 5 instead of 4 when the next button is pressed.

i posted up the code for the questionnaire page, proceed (which is called when the next button is pressed) and tally (which tallys up the answers at the end and saves them to database).
Reply With Quote
  #6 (permalink)  
Old Aug 10th, 2006, 11:31
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,650
Blog Entries: 1
Thanks: 0
Thanked 4 Times in 4 Posts
Re: ASP Survey - Skipping Questions

Not angry... I appologize if it came across that way.

What I gathered from the code you posted is that you'll need something like this:
Code: Select all
If Answer='a' Then
 Server.Transfer ("/questions.asp?QC=5")
Else
 ' next question...
End If
Problem is:
Code: Select all
  <%
  Set rsQuery = Con.Execute("SELECT * FROM QDB ORDER BY ID ASC")
  For x = 1 To (Request.Querystring("QC") - 1)
      rsQuery.MoveNext
    If rsQuery.EOF Then Response.Redirect "error.asp?cs=Wrong querystring data. Possible cause: Manually edited?"
  Next
  Multiple = rsQuery("MultipleChoices")
  %>
This seems to require an answer for every question so you'll need to modify that too is you want this to work.



I'm not having a go but, that script is so badly coded I'd recommend you find another free questionnaire script - which might even already have the functionality you need.
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
Reply

Tags
asp, survey, skipping, questions

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CS3 - Skipping the Animation in Flash Header atwba Flash & Multimedia Forum 1 Nov 17th, 2007 16:48
Female/Male Survey alexgeek Webforumz Cafe 13 Oct 16th, 2007 17:08
Creating a Web Survey bonfire28 PHP Forum 3 Nov 20th, 2006 15:16
eservices.mu/survey/survey.aspx vincent Free Web Site Critique 10 Jul 12th, 2006 10:45
php online survey - coding help gribble PHP Forum 1 Jun 18th, 2006 23:12


All times are GMT. The time now is 05:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43