![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 50 Pomógł: 0 Dołączył: 11.04.2006 Ostrzeżenie: (0%) ![]() ![]() |
Posiadam skrypt, ktory otwiera strone w nowym okienku. Wszystko dziala tylko brakuje fukcji przywolywania okna. Czyli jezeli ponownie klikniemy w ten sam link, to strona ma sie odswiezyc i ponownie "wyskoczyc" na pierwszy plan.
Przyklad: Klikamy na link i otwiera sie w nowym okienku strona. Minimalizujemy to okienko. Ponownie klikamy w link i okienko ma ponownie sie wywolac. <script language="JavaScript"> <!-- function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) { toolbar_str = toolbar ? 'yes' : 'no'; menubar_str = menubar ? 'yes' : 'no'; statusbar_str = statusbar ? 'yes' : 'no'; scrollbar_str = scrollbar ? 'yes' : 'no'; resizable_str = resizable ? 'yes' : 'no'; window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+', toolbar='+toolbar_str+',menubar='+menubar_str+', status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); } // --> </script> <a onclick="na_open_window('button', 'nowe_okno_htm', 0, 0, 450, 450, 0, 0, 0, 0, 0);"> link </a> Szukalem na forum, ale nie znalazlem takiego problemu. Prosze o pomoc.
Ten post edytował luckyluc 21.06.2006, 22:09:02 |
|
|
![]()
Post
#2
|
|
![]() Grupa: Przyjaciele php.pl Postów: 2 258 Pomógł: 16 Dołączył: 21.09.2004 Skąd: Kielce Ostrzeżenie: (0%) ![]() ![]() |
Kod var okno;
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) { toolbar_str = toolbar ? 'yes' : 'no'; menubar_str = menubar ? 'yes' : 'no'; statusbar_str = statusbar ? 'yes' : 'no'; scrollbar_str = scrollbar ? 'yes' : 'no'; resizable_str = resizable ? 'yes' : 'no'; if(okno) { okno.focus() } else { window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+', toolbar='+toolbar_str+',menubar='+menubar_str+', status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); } } -------------------- -------------
------ |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 50 Pomógł: 0 Dołączył: 11.04.2006 Ostrzeżenie: (0%) ![]() ![]() |
Posiedzialem troche, opuscilem kilka meczow Mistrzostw Swiata, ale poprawilem skrypt
![]() <script language=\"JavaScript\"> <!-- var okno; function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) { toolbar_str = toolbar ? 'yes' : 'no'; menubar_str = menubar ? 'yes' : 'no'; statusbar_str = statusbar ? 'yes' : 'no'; scrollbar_str = scrollbar ? 'yes' : 'no'; resizable_str = resizable ? 'yes' : 'no'; if(okno) { okno.focus() } else { okno = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+', toolbar='+toolbar_str+',menubar='+menubar_str+', status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str); } } // --> </script> Ten post edytował luckyluc 21.06.2006, 22:09:29 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 19.07.2025 - 13:10 |