delayed popup code

javascript, popup

Solution

You'll need to use JavaScript to add this script tag to the page after a 10 second timeout, rather than loading it up front. This should work for you:

<script>
    setTimeout(function() {
        var head = document.getElementsByTagName('head')[0];
        var script = document.createElement('script');
        script.src = 'http://www.surveymonkey.com/jsPop.aspx?sm=WVuy7oI7MerxwqmaCFF23g_3d_3d';
        head.appendChild(script);
    }, 10000);
</script>

Problem

I'm currently trying to set up a pop-up survey for my website that appears to visitors after 10 seconds, but only have a remedial understanding of coding. Surveymonkey generated the following code for the pop-up, but how would I add in this delayed pop-up feature? ``` <script src="http://www.surveymonkey.com/jsPop.aspx?sm=WVuy7oI7MerxwqmaCFF23g_3d_3d"> </script> ```

Original source