Computing variables for routing
"Luca Notari" <[email protected]> Wed, 10 Oct 2007 17:43:49 +0200
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <001f01c80b54$5a4c08f0$0400a8c0@asus01> |
This is a multi-part message in MIME format.
------=_NextPart_000_0020_01C80B65.1DD4D8F0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Hi all,
Unfortunately I'm not able to resolve a problem when computing
variables...
This is the case:
suppose a page with a Matrix tag; the respondent has to reach a score in
order to decide where to go
If the score <=10 go to page1.survey
if > 10 go to page2
I've uset the <SUBMIT> tag , and I need the SUM of variables
Do I need another separate page for computing variables? Because this
code:
<SUBMIT>
{|
my($sum)=$session->getValue("SUBMITTED_var1") +
$session->getVAlue("SUBMITTED_var2") ....
if($sum<=10) $document->SetOption("CONTINUE","page1.survey")
doesnt work
------=_NextPart_000_0020_01C80B65.1DD4D8F0
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<TITLE>Messaggio</TITLE>
<META content=3D"MSHTML 6.00.2900.3157" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>Hi=20
all,</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial =
size=3D2>Unfortunately I'm=20
not able to resolve a problem when computing =
variables...</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>This =
is the=20
case:</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial =
size=3D2>suppose a page with=20
a Matrix tag; the respondent has to reach a score in order to decide =
where to=20
go</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>If the =
score <=3D10=20
go to page1.survey</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>if =
> 10 go to=20
page2</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>I've =
uset the=20
<SUBMIT> tag , and I need the SUM of variables =
</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>Do I =
need another=20
separate page for computing variables? Because this code: =
</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2><SUBMIT></FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2>{|</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2>my($sum)=3D$session->getValue("SUBMITTED_var1") +=20
$session->getVAlue("SUBMITTED_var2") ....</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial =
size=3D2>if($sum<=3D10)=20
$document->SetOption("CONTINUE","page1.survey")</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial size=3D2>doesnt =
work</FONT></SPAN></DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D890133415-10102007><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV></BODY></HTML>
------=_NextPart_000_0020_01C80B65.1DD4D8F0--
Skickat av "Luca Notari" <[email protected]>
till survey-discussion