delay on hiding images on pageload
May 22, 2009 12:00 AM
Hi everyone!
I am seeking advice for a tricky issue. I have some pages with questions and I have to track the answers in every page (show how many questions have been answered correctly or not, so far). So, I am using an image as the answers' counter and have two images, one for the correct answer and another one for the incorrect answer.
Because the student has to see the correct/incorrect feedback when navigating forth and back in the questions he has already answered I need to have the correct/incorrect images for all the questions on all pages. I put them all there and hide the ones that do not need to show.
The problem there, is that when a question in empty (not answered) Lectora counts it as incorrect, so the incorrect images show on PageLoad. I do not want this to happen so I did the following:
I am hiding the correct/incorrect images when Question variable is empty. Because the OnShow action did not work, I used an OnTimer action, in page level. I set the interval in 0,00001, but when the page loads for the first time the images do have enough time, probably, to be hidden so it seems that they "flash" out of the screen. It is like having an animated effect, only it is an unwanted one.
Once the questions are answered and the relative image feedback displays, everything is fine.
I also tried a 0,1 sec interval on the OnTimer action, in case 0,00001 which is traslated to 0,0 by lectora caused a ghlitch there, but nothing changed.
So, does anyone have any idea how to hide the images in time, before the page loads and they do not appear to blink on the page?
Thanks
TheoniHi everyone!
I am seeking advice for a tricky issue. I have some pages with questions and I have to track the answers in every page (show how many questions have been answered correctly or not, so far). So, I am using an image as the answers' counter and have two images, one for the correct answer and another one for the incorrect answer.
Because the student has to see the correct/incorrect feedback when navigating forth and back in the questions he has already answered I need to have the correct/incorrect images for all the questions on all pages. I put them all there and hide the ones that do not need to show.
The problem there, is that when a question in empty (not answered) Lectora counts it as incorrect, so the incorrect images show on PageLoad. I do not want this to happen so I did the following:
I am hiding the correct/incorrect images when Question variable is empty. Because the OnShow action did not work, I used an OnTimer action, in page level. I set the interval in 0,00001, but when the page loads for the first time the images do have enough time, probably, to be hidden so it seems that they "flash" out of the screen. It is like having an animated effect, only it is an unwanted one.
Once the questions are answered and the relative image feedback displays, everything is fine.
I also tried a 0,1 sec interval on the OnTimer action, in case 0,00001 which is traslated to 0,0 by lectora caused a ghlitch there, but nothing changed.
So, does anyone have any idea how to hide the images in time, before the page loads and they do not appear to blink on the page?
Thanks
Theoni
Discussions have been disabled for this post