I am implementing a survey that collects family cancer history in version 2.05. The survey goes through a set of questions for each of the respondent's relatives diagnosed with cancer. After all of the relatives are entered I use some fancy tailoring to present a summary of the relatives for whom history has been entered.
After enabling jumping incrementally, the summary now includes links to the specific page where each relative's history was started in case the respondent needs to make edits to previous answers.
Currently I set the page to jump to manually, but I would prefer to make that link variable so that if more questions are added to the family history I don't need to edit the summary.
To do that I need to capture the value of $("#thispage").attr("value"); when the target page is active, in this case the first female relative (fr1) and recall that value when building the summary links.
The only way I can think of to retain information is to write it to the TOKEN object during the processing and then extracting it again later.
So I added a user defined attribute_4 to my token table "fr1" for the first female relative. With the idea that I would trigger javascript in the document ready code that would check for the question id and if it is the id for the first relative, store the value of: $("#thispage").attr("value"); to the TOKEN object. This is where I get stuck. I am not sure I actually HAVE any way of modifying the TOKEN object during run time.
Does anyone know?
Does anyone have an idea for another approach?
I have some ideas, but they are fairly convoluted, so if I could make this work it would be better.
Thanks in advance!