Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 12th, 2009, 10:42 PM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Survey Matrix Ranking question

Hi,

We are developing survey proj and stuck in creating Matrix ranking question. Can you please help me, how to create matrix ranking questions (multiple rows/cols)? Any help highly appreciated.

Thanks in advance.

Here are the tables. I am done with checkbox, radio,textbox and dropdown questions.
Do i need to alter or create table for matrix ranking? or following is ok? Can i get any sample source code for matrix ranking ?

CREATE TABLE `survey_question` (
`Seq` int(10) NOT NULL auto_increment,
`SurveyID` int(10) default NULL,
`QSortID` int(10) default NULL,
`Question` varchar(512) default NULL,
`QuestionType` int(10) default NULL,
`CreatedOn` timestamp NULL default CURRENT_TIMESTAMP,
`LastModifiedOn` datetime default NULL,
`LastModifiedBy` varchar(256) default NULL,
`Active` int(1) default '0',
`Page` int(10) default '1',
PRIMARY KEY (`Seq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `survey_choice` (
`Seq` int(10) NOT NULL auto_increment,
`SurveyID` int(10) default NULL,
`QuestionID` int(10) default NULL,
`ChoiceID` int(10) default NULL,
`Choice` varchar(512) default NULL,
`OtherChk` int(1) default '0',
`ModifiedBy` varchar(128) default NULL,
`ModifiedOn` datetime default NULL,
PRIMARY KEY (`Seq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `survey_response` (
`Seq` int(10) NOT NULL auto_increment,
`SurveyID` int(10) default NULL,
`QuestionID` int(10) default NULL,
`QuestionType` int(10) default NULL,
`ChoiceID` int(10) default NULL,
`Choice` varchar(512) default NULL,
`CreatedOn` timestamp NULL default CURRENT_TIMESTAMP,
`LastModifiedOn` datetime default NULL,
`Email` varchar(256) default NULL,
`IPAddress` varchar(256) default NULL,
`SessionID` varchar(256) default NULL,
`Complete` int(1) default '0',
`OtherChk` int(1) default '0',
PRIMARY KEY (`Seq`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;



Example of Matrix Ranking:

<div id="q1" class="question" style="margin:0 0 0 0;"><div class="qContent"><h3 class="qHeader"><abbr class="noborder" title="Question 1">1</abbr>. Question</h3><div class="qBody" style="width:100%;"><table cellspacing="0" cellpadding="0" border="0" style="width:100%;"><thead><tr><th style="width:20%;">&nbsp;</th><th scope="col" style="width:16%;">c1</th><th scope="col" style="width:16%;">c2</th><th scope="col" style="width:16%;">c3</th><th scope="col" style="width:16%;">c4</th><th scope="col" style="width:16%;">c5</th></tr></thead><tbody><tr class="matrixAltRow"><th scope="row" align="left">r1</th><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533563_0" id="input_116267274_60_1351533563_1351533558" value="1351533558" /><label for="input_116267274_60_1351533563_1351533558" id="linput_116267274_60_1351533563_1351533558" class="rb_off"><span class="qLabel">r1 c1</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533563_0" id="input_116267274_60_1351533563_1351533559" value="1351533559" /><label for="input_116267274_60_1351533563_1351533559" id="linput_116267274_60_1351533563_1351533559" class="rb_off"><span class="qLabel">c2</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533563_0" id="input_116267274_60_1351533563_1351533560" value="1351533560" /><label for="input_116267274_60_1351533563_1351533560" id="linput_116267274_60_1351533563_1351533560" class="rb_off"><span class="qLabel">c3</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533563_0" id="input_116267274_60_1351533563_1351533561" value="1351533561" /><label for="input_116267274_60_1351533563_1351533561" id="linput_116267274_60_1351533563_1351533561" class="rb_off"><span class="qLabel">c4</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533563_0" id="input_116267274_60_1351533563_1351533562" value="1351533562" /><label for="input_116267274_60_1351533563_1351533562" id="linput_116267274_60_1351533563_1351533562" class="rb_off"><span class="qLabel">c5</span></label></div></td></tr><tr class="matrixRow"><th scope="row" align="left">r2</th><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533564_0" id="input_116267274_60_1351533564_1351533558" value="1351533558" /><label for="input_116267274_60_1351533564_1351533558" id="linput_116267274_60_1351533564_1351533558" class="rb_off"><span class="qLabel">r2 c1</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533564_0" id="input_116267274_60_1351533564_1351533559" value="1351533559" /><label for="input_116267274_60_1351533564_1351533559" id="linput_116267274_60_1351533564_1351533559" class="rb_off"><span class="qLabel">c2</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533564_0" id="input_116267274_60_1351533564_1351533560" value="1351533560" /><label for="input_116267274_60_1351533564_1351533560" id="linput_116267274_60_1351533564_1351533560" class="rb_off"><span class="qLabel">c3</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533564_0" id="input_116267274_60_1351533564_1351533561" value="1351533561" /><label for="input_116267274_60_1351533564_1351533561" id="linput_116267274_60_1351533564_1351533561" class="rb_off"><span class="qLabel">c4</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533564_0" id="input_116267274_60_1351533564_1351533562" value="1351533562" /><label for="input_116267274_60_1351533564_1351533562" id="linput_116267274_60_1351533564_1351533562" class="rb_off"><span class="qLabel">c5</span></label></div></td></tr><tr class="matrixAltRow"><th scope="row" align="left">r3</th><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533565_0" id="input_116267274_60_1351533565_1351533558" value="1351533558" /><label for="input_116267274_60_1351533565_1351533558" id="linput_116267274_60_1351533565_1351533558" class="rb_off"><span class="qLabel">r3 c1</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533565_0" id="input_116267274_60_1351533565_1351533559" value="1351533559" /><label for="input_116267274_60_1351533565_1351533559" id="linput_116267274_60_1351533565_1351533559" class="rb_off"><span class="qLabel">c2</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533565_0" id="input_116267274_60_1351533565_1351533560" value="1351533560" /><label for="input_116267274_60_1351533565_1351533560" id="linput_116267274_60_1351533565_1351533560" class="rb_off"><span class="qLabel">c3</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533565_0" id="input_116267274_60_1351533565_1351533561" value="1351533561" /><label for="input_116267274_60_1351533565_1351533561" id="linput_116267274_60_1351533565_1351533561" class="rb_off"><span class="qLabel">c4</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533565_0" id="input_116267274_60_1351533565_1351533562" value="1351533562" /><label for="input_116267274_60_1351533565_1351533562" id="linput_116267274_60_1351533565_1351533562" class="rb_off"><span class="qLabel">c5</span></label></div></td></tr><tr class="matrixRow"><th scope="row" align="left">r4</th><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533566_0" id="input_116267274_60_1351533566_1351533558" value="1351533558" /><label for="input_116267274_60_1351533566_1351533558" id="linput_116267274_60_1351533566_1351533558" class="rb_off"><span class="qLabel">r4 c1</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533566_0" id="input_116267274_60_1351533566_1351533559" value="1351533559" /><label for="input_116267274_60_1351533566_1351533559" id="linput_116267274_60_1351533566_1351533559" class="rb_off"><span class="qLabel">c2</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533566_0" id="input_116267274_60_1351533566_1351533560" value="1351533560" /><label for="input_116267274_60_1351533566_1351533560" id="linput_116267274_60_1351533566_1351533560" class="rb_off"><span class="qLabel">c3</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533566_0" id="input_116267274_60_1351533566_1351533561" value="1351533561" /><label for="input_116267274_60_1351533566_1351533561" id="linput_116267274_60_1351533566_1351533561" class="rb_off"><span class="qLabel">c4</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533566_0" id="input_116267274_60_1351533566_1351533562" value="1351533562" /><label for="input_116267274_60_1351533566_1351533562" id="linput_116267274_60_1351533566_1351533562" class="rb_off"><span class="qLabel">c5</span></label></div></td></tr><tr class="matrixAltRow"><th scope="row" align="left">r5</th><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533567_0" id="input_116267274_60_1351533567_1351533558" value="1351533558" /><label for="input_116267274_60_1351533567_1351533558" id="linput_116267274_60_1351533567_1351533558" class="rb_off"><span class="qLabel">r5 c1</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533567_0" id="input_116267274_60_1351533567_1351533559" value="1351533559" /><label for="input_116267274_60_1351533567_1351533559" id="linput_116267274_60_1351533567_1351533559" class="rb_off"><span class="qLabel">c2</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533567_0" id="input_116267274_60_1351533567_1351533560" value="1351533560" /><label for="input_116267274_60_1351533567_1351533560" id="linput_116267274_60_1351533567_1351533560" class="rb_off"><span class="qLabel">c3</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533567_0" id="input_116267274_60_1351533567_1351533561" value="1351533561" /><label for="input_116267274_60_1351533567_1351533561" id="linput_116267274_60_1351533567_1351533561" class="rb_off"><span class="qLabel">c4</span></label></div></td><td align="center"><div class="qOption"><input type="radio" class="rb" name="input_116267274_60_1351533567_0" id="input_116267274_60_1351533567_1351533562" value="1351533562" /><label for="input_116267274_60_1351533567_1351533562" id="linput_116267274_60_1351533567_1351533562" class="rb_off"><span class="qLabel">c5</span></label></div></td></tr></tbody></table></div></div></div>
__________________
Rams
 
Old March 19th, 2009, 02:23 PM
Authorized User
 
Join Date: Jun 2006
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default Survey Ranking Question

I have done this myself.

Working great.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Survey: question/response + Drill questions ssertial BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 January 7th, 2009 03:23 AM
Ranking in a Group paul20091968 Excel VBA 8 November 2nd, 2006 09:45 AM
Survey App Question flsimmons BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 May 26th, 2006 03:14 PM
how can i handle 3 question in a survey blueguy Classic ASP Basics 6 October 24th, 2004 06:41 PM
Survey Question! NeedASP Classic ASP Databases 0 April 9th, 2004 12:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.