• Страница 1 из 1
  • 1
Модератор форума: likbezz  
Скрипты и коды для юкоз - Форум аццкого кодера » Исходники, Скрипты, Коды, Шаблоны, Примеры, Прикрепления, Инструменты и тп. » Скрипты JavaScript, Примеры на JavaScript, полезные исходники, подобное » function openPopupWindow(url, width, height)
function openPopupWindow(url, width, height)
Дата: Пятница, 01.11.2013, 23:23 |
likbezz
Аццкий кодер
Группа: Администраторы
Сообщений: 9093
Награды: 23
Репутация: 459
Статус: Unknown


Код
function openPopupWindow(url, width, height) {
  justPopupWindow(url, width, height);
  return false;
}


Код
function justPopupWindow(url, width, height) {
  var w = window.open(url,'_blank','toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,width='+width+',height='+height);
  w.focus();
}


Код
function openImagePopupWindow(url, width, height, title) {
  var w = window.open('/', null, 'width='+width+', height='+height+', toolbar=no, status=no, location=no, menubar=no, resizable=yes, scrollbars=no');
  w.document.open();

  w.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'+"\n");
  w.document.write('<html><head><title>'+title+'</title>');
  w.document.write('<style>html, body { padding: 0; margin: 0; background: #FFFFFF;  height: 100%; position: relative; cursor: hand;}');
  w.document.write(' img {position: absolute; left: 50%; top: 50%; margin-left: -'+Math.ceil(width / 2)+'px; margin-top: -'+Math.ceil(height / 2)+'px;} </style>');
  w.document.write('</head><body onclick="window.close();" title="'+title+"\n\n"+'п?п°пІп?п?я?п? пҐп° п?п°я€я?п?пҐп?я?'+"\n"+'я?я?пюп?я? пЇп°п?я€я?я?я? пюп?пҐпю">');
  w.document.write('<img src="'+url+'" width="'+width+'" height="'+height+'" border="0" alt="'+title+"\n\n"+'п?п°пІп?п?я?п? пҐп° п?п°я€я?п?пҐп?я?'+"\n"+'я?я?пюп?я? пЇп°п?я€я?я?я? пюп?пҐпю"></body></html>');

  w.document.close();
  w.focus();
  return false;
}


 
Дата: Суббота, 02.11.2013, 09:55 |
Генерал-майор
Группа: Проверенные
Сообщений: 440
Награды: 0
Репутация: 14
Статус: Offline


Даже не знал что так можно. =)

 
Скрипты и коды для юкоз - Форум аццкого кодера » Исходники, Скрипты, Коды, Шаблоны, Примеры, Прикрепления, Инструменты и тп. » Скрипты JavaScript, Примеры на JavaScript, полезные исходники, подобное » function openPopupWindow(url, width, height)
  • Страница 1 из 1
  • 1
Поиск:


Мобильная версия