I'm building a multi-question survey where I'm using javascript to:
make sure all survey questions displayed on a page are answered
show an additional question on a page based on the answer to a previous item.
Both 1 and 2 seem to be working in 90% of the browsers and operating systems I've tested this with. I'm not seeing any consistency when it doesn't work.
Example: https://ssl.bullysurvey.com/QUESTIONS/m_survey/02.html
If the 'Yes' response is selected for item 1a, you'll see 1b appear. Both items should then require a response before proceeding to the next page. When 'Yes' for 1a is selected the file '02_table_2.html' is loaded and inserted below 1a.
The problem is that about 10% of the time when 'Yes' is selected for 1a, 1b doesn't always appear or if it does, a response is not required for 1b. When I collect a 'Yes' response for 1a in my database, I should always have a response for 1b. This is not always the case and it's a problem. In these rare cases, I don't think the javascript code is working all the time. Maybe when the problem appears the pages have not loaded completely or there's some other glitch I'm not aware of.
I'd appreciate it if someone could look this over. Do you see a problem with my coding? Is there a better way to do this?
Thanks so much,
Mike