Re: проблемы с viewer_id
Добавлено: 09 мар 2013, 19:15
вас учили закрывать функции и ставить точку с запятой?
где-то так:
З.Ы. не могу понять зачем выполнять запрос к АПИ, если никаких данных не используется))) возможно вы будете потом использовать результат АПИ...
где-то так:
Код: Выделить всё
<html><head><script src="http://vkontakte.ru/js/api/openapi.js" type="text/javascript" charset="windows-1251"></script><script type="text/javascript" src="http://vk.com/js/api/xd_connection.js?2"></script><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script></head> <script type="text/javascript" charset="cp1251" >VK.init(function() { test();});function test() {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];}var viewer_id = flashVars['viewer_id']; VK.api("users.get", {"uids":viewer_id}, function(data) {$('#you1').html('<iframe src="/VK-COM/Pirate-network/htm/test/99.htm?api_url=http://api.vk.com/api.php&viewer_id='+viewer_id+'&" width="100%" height="500" border="100" frameborder="1" framespacing="0" MARGINWIDTH="0" MARGINHEIGHT="0"></iframe>');});}</script> <body><div id="you1"></div></body></html>