Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.87 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. addBox = new MessageBox({title: 'Отправка цитаты на стену другу'});
  2.         addBox.addButton({label: "Закрыть", style: 'button_no', onClick: addBox.hide});
  3.         addBox.addButton({label: "Отправить", onClick:function() {setStatus(text, $('#friendList').val()); addBox.hide; }});
  4.         addBox.content('<div id="friendListContainer">Выберите друга, которому хотите отправить цитату:<br /><br /><input id="friendList"></div>');
  5.         addBox.show();
  6.         VK.api('friends.get', {fields: 'uid'}, function(data) {
  7.                 var html = '[';
  8.                 var s = data.response.length;
  9.                 for(var i = 0; i < s; i++){
  10. html += '['+data.response[i].uid+', "'+data.response[i].first_name+' '+data.response[i].last_name+(data.response[i].online?' [в сети]':'')+'"],';
  11.                 }
  12.                 html += ']';
  13.                 new Dropdown(ge('friendList'),eval(html),{width: 200});
  14.         });