There is a file with functions where the following is written:
function myPoll_v_1(){ global $user_ID; if ($user_ID) {//если залогинен то показываем ?> <script type="text/javascript"> $(document).ready(function(){ $('#poll-container').load('p/myPoll/xxx.html');//подгружаем форму для голосования }); </script> <div id="poll-container">//сюда подгружаем </div> <? }else{//если незалогинен ничего не показываем echo ' '; } }
The content of the file xxx.html:
** deleted these three lines **
<div id="poll-container"> <h3>Poll</h3> <form id='poll' action="/p/myPoll/poll.php" method="post" accept-charset="utf-8"> <p>Pick your favorite Javascript framework:</p><p> <input type="radio" name="poll" value="opt1" id="opt1" /><label for='opt1'> jQuery</label><br /> <input type="radio" name="poll" value="opt2" id="opt2" /><label for='opt2'> Ext JS</label><br /> <input type="radio" name="poll" value="opt3" id="opt3" /><label for='opt3'> Dojo</label><br /> <input type="radio" name="poll" value="opt4" id="opt4" /><label for='opt4'> Prototype</label><br /> <input type="radio" name="poll" value="opt5" id="opt5" /><label for='opt5'> YUI</label><br /> <input type="radio" name="poll" value="opt6" id="opt6" /><label for='opt6'> mootools</label><br /><br /> <input type="submit" value="Vote →" /></p> </form> </div>
The function is called in the sidebar of the wordpress (from the widget menu).
At the moment, when you click on the button, the transition to poll.php occurs. How to make so that the transition does not occur, all the work was carried out in <div id="poll-container"></div>
(What am I trying to do? I'm trying to tie this vote to WordPress.)
upd hmm ... really two lines were left there (link to a nonexistent jackpot and a plug-in for it), also removed poll.js (after all, it is registered in the header of the page where the form should be shown) back to what it was, now the form does not react to anything.
UPD2 problem is finally solved here.