Posted on behalf of Eric Dinkin
I am trying poll on our website and the ideal situation would be as follows:
click on option
click on vote --> the same page reloads and shows results
bear in mind that poll is nested content in our homepage, so the homepage reloads with results. Multiple voting is disabled.
Currently when you click on vote it opens a new page, I thought Ok I will put some more info there, what I didn't realize that next time I went on the homepage where poll used to be it replaced it with results (no multiple voting) so I rebuilt results to fit the 180px wide space I allocated to it and decided to use %poll_vote_button_js_new_window% keyword to show results in a new window, but instead of getting a submit button that would submit the poll and open new window I only get this on a front end
CODE (as you can see some code seems to be missing from the button- no open or close tags etc etc)
window.open('', 'results', 'width=185,height=220,location=0,menubar=0,scrollbars=0,statusbar=0,toolbar=0,resizable=0'); document.getElementById("page_poll_31438_poll").target='results'; document.getElementById("page_poll_31438_poll").submit();
It seems location parameter is missing from window.open, but I don't know what to put there.
I've tried this
CODE
<input type="submit" id="page_poll_31438_poll" class="sq-form-field" onclick=' window.open('', 'results', 'width=185,height=220,location=0,menubar=0,scrollbars=0,statusbar=0,toolbar=0,resizable=0'); document.getElementById("page_poll_31438_poll").target='results'; document.getElementById("page_poll_31438_poll").submit(); ' value="Submit" name="page_poll_31438_poll"/>
It doesn't submit the form at all
Help I need to fix it ASAP and I don't know how.
Have you tried using Firebug in Firefox to see if you are getting any javascript errors?
As mentioned on the other topic, the Support forum along with all other forums on this site is not an official support resource. It is recommended that you ring the Squiz Support line.