I am not too familiar with scripts but I wanted to see if
i could get an example or some help on a new page of my
website. It is just a simple survey.. about 10 questions
with option buttons only (as answers). I don't know where
to begin with the code.. i have the format of the page all
done I just have to add the code where it checks the value
(if the correct answer was selected) of each answer. Then
at the end I tally up the total right, then I open a new
window.. depending on the number correct. Thanks in
advance.. i hope someone can help me out with this one.

re: option buttons logic by Jim

Jim
Sat Dec 06 23:41:24 CST 2003

This is going to be tough if you're not too familiar with
scripts. To do this in an ASP page, however, you'd:

1. Set up each set of option buttins with the same
name, but different values. For example:

<input type="radio" name="Q1" value="A">
<input type="radio" name="Q1" value="B">
<input type="radio" name="Q1" value="C">
<input type="radio" name="Q1" value="D">

<input type="radio" name="Q2" value="T">
<input type="radio" name="Q2" value="F">

and so forth

2. Add some code like this to the page that processes
your form submission.

<%
Dim numcorr
numcorr = 0
If Request("Q1") = "C" Then numcorr = numcorr + 1
If Request("Q2") = "T" Then numcorr = numcorr + 1
If Request("Q3") = "B" Then numcorr = numcorr + 1
' check for additional correct answers here.
select case numcorr
case 9,10
response.redirect "grade-a.htm"
case 7,8
response.redirect "grade-b.htm"
case 5,6
response.redirect "grade-c.htm"
case 3,4
response.redirect "grade-d.htm"
case else
response.redirect "grade-f.htm"
end select
%>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
|| Microsoft FrontPage Version 2002 Inside Out
|| Web Database Development Step by Step .NET Edition
|| Troubleshooting Microsoft FrontPage 2002
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------



>-----Original Message-----
>I am not too familiar with scripts but I wanted to see
if
>i could get an example or some help on a new page of my
>website. It is just a simple survey.. about 10 questions
>with option buttons only (as answers). I don't know
where
>to begin with the code.. i have the format of the page
all
>done I just have to add the code where it checks the
value
>(if the correct answer was selected) of each answer.
Then
>at the end I tally up the total right, then I open a new
>window.. depending on the number correct. Thanks in
>advance.. i hope someone can help me out with this one.
>.
>

Re: option buttons logic by MD

MD
Sun Dec 07 08:08:43 CST 2003

Hi,

You may wish to take a look at J-Bots Test Your Knowledge
http://www.websunlimited.com/order/Product/General/quiz.htm
--
Mike -- FrontPage MVP '97 - '02
http://www.websunlimited.com
Our latest products "At Your Command" and IncludeASP
http://www.websunlimited.com/order/Product/AYC/ayc.htm
http://www.websunlimited.com/order/product/includeASP/includeASP.htm
----------------------------------------------------------------------------
--------------------
If you think I'm doing a good job, let MS know at mvpga@microsoft.com

"lpjennifer" <anonymous@discussions.microsoft.com> wrote in message
news:02ea01c3bc66$243b54a0$a401280a@phx.gbl...
> I am not too familiar with scripts but I wanted to see if
> i could get an example or some help on a new page of my
> website. It is just a simple survey.. about 10 questions
> with option buttons only (as answers). I don't know where
> to begin with the code.. i have the format of the page all
> done I just have to add the code where it checks the value
> (if the correct answer was selected) of each answer. Then
> at the end I tally up the total right, then I open a new
> window.. depending on the number correct. Thanks in
> advance.. i hope someone can help me out with this one.