Reputation: 11
I am trying to embed survey monkey in my website within a div tag. I have included embedded script tag within that div tag and the survey loads correctly sometime in the designated spot. However, when you keep on refreshing the page, the Survey tends to load way at the bottom (a different spot). I believe, the survey window is shown where ever that embedded script tag is defined. Please correct me if I am missing anything.
Any help/feedback in this regard will be highly appreciated.
Upvotes: 1
Views: 719
Reputation: 88
I also ran into this issue. The embed script assumes the last script tag found is its own script tag, and uses its parent element as the node to append the survey to.
targetScript = allScripts[allScripts.length-1]
(replaced minified variable names with something more descriptive for clarity)
If the script loads late, the target script element ends up being a script further down on the page.
I was able to fix the embed code by creating an empty DIV element and using that as the target element to insert the survey.
Upvotes: 1