
I was tasked with creating a pop-up survey for a project. Fairly simple whether I used the jQuery dialog or not so I added a “Thank you” dialog that displays the survey results with a lightweight, css-based bar chart just for fun.
Pop-up Behavior
- Pop-up survey opens when page loads. Pop-ups on window.unload or window close are being blocked by most browsers due to abuse and overuse.
- Cookie is set when survey submitted or user opts out (“No, thanks” click).
- Closing dialog will not set cookie
All survey data is stored in a database and jQuery .post is used to shuttle the information back and forth.
Tags: Dialog