From: Sean M A. <sea...@gr...> - 2002-01-18 14:46:29
|
The slick way to go about this of course would be to make php generate the javascript dynamically from the choices that the admin makes for a particular set of questions. Keep in mind though that this could screw with the results, making them less understandable. If you have question 1 which is a yes/no answer, and then have question 2 who's answers (and/or question) depend on the answer to question 1, you create a branching of the results.... Question 1 Yes 50% - Question 2 A) 10% B) 35% C) 40% D) 15% No 50% - Question 2 E) 5% F) 70% G) 25% Would you present it this way? Would you tally the total respondents for question 2 as being the sum of the respondents for each branch of question 2 (as I've depicted) or would it the percentages need to be skewed such that Question 2 adds up to 100% regardless of which branch an answer was made? It certainly presents a challenge. I work with a commercial knowledge management system that uses an HTML output preprocessor, which they call WebLingo. It really works just like php the way it's embedded into an HTML structure or vice versa. Anyway, they use it to dynamically create what could be several different javascript programs within the same HTML file depending on how it's accessed, what's in the user's cookie, or something along that line. On Thu, 2002-01-17 at 15:01, James E. Flemer wrote: > On Thu, 17 Jan 2002, Paul Borgermans wrote: > > > Hi, > > > > I discovered phpESP a few minutes ago: seems a great program! > > I have two questions, however: > > > > 1) I would like to include pictures with questions. > > It appears that this is possible by including <img src=.... in the question > > text. Is this intended (to include any HTML)? > > Yes. > > > 2) A difficult one: sometimes there are surveys where an answer on one > > question may impose a change in the possibilities for another answer. > > This is in theory possible to implement with client-side javascript. Is > > there a way to do so? I could live with some extra textfields in the admin > > interface where the javascript code is entered. Or a pointer in the code to > > add such functionality? > > I don't like JavaScript. So I write/use as little as > possible. If you would like to add this to phpESP feel free > to do so. I would add it to the main package if you do. > > -James > > > _______________________________________________ > phpESP-general mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-general > -- Sean M. Alderman ITRACK Systems Analyst PACE/NCI - NASA Glenn Research Center (216) 433-2795 Calling a windowed operating system "Windows" is like naming an automobile "Wheels." |