Код: Выделить всё
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><!-- подключаем jQuery --><script src="js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="http://vkontakte.ru/js/api/xd_connection.js?2" type="text/javascript"></script> <script type="text/javascript" charset="cp1251" >$(document).ready(function(){ // когда страница загрузится VK.init(function() { // получаем flashVars var parts=document.location.search.substr(1).split("&"); var flashVars={}, curr; for (i=0; i<parts.length; i++) { curr = parts[i].split('='); flashVars[curr[0]] = curr[1]; } // вытаскиваем viewer_id и auth_key из полученных переменных var viewer_id = flashVars['viewer_id']; var auth_key = flashVars['auth_key']; // отправляем post запрос, передаём viewer_id и auth_key $.post('http://xg-online.net/game/stats.php', // заменяем на адерс своего скрипта { "viewer_id": viewer_id, "auth_key": auth_key }, // передаваемые значения function(data){ // функция после выполнения передачи данных $('#result').html(data); }); }); });</script></head><body><div id="result">.</div><table border=0 width=100% height=100%><tr> <td align=center> <i style="font-family:Arial;">Запуск игры 30.11.10 в 21:00!</i> <div style="font-family:Tahoma;font-size:15px;position:center;top:100px;right:100px;font-weight:bold;color:blue">123</div> <div style="font-family:Tahoma;font-size:10px;position:center;font-weight:bold;color:blue">321</div> <!-- Put this script tag to the <head> of your page --><!-- Put this script tag to the <head> of your page --><script type="text/javascript" src="http://userapi.com/js/api/openapi.js?19"></script> <script type="text/javascript"> VK.init({apiId: 1916234, onlyWidgets: true});</script> <!-- Put this div tag to the place, where the Poll block will be --><div id="vk_poll"></div><script type="text/javascript">VK.Widgets.Poll("vk_poll", {width: "700"}, "00000000000000000000");</script> </td></tr></table></body></html>
Т.е.
Код: Выделить всё
VK.init(function()
Код: Выделить всё
VK.init({apiId: 1916234, onlyWidgets: true});