Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Przywolywanie NOWEGO OKIENKA - ZROBIONE :)
luckyluc
post 20.06.2006, 22:26:21
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
Go to the top of the page
+Quote Post
revyag
post 21.06.2006, 10:05:14
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);
}
}


--------------------
-------------

------
Go to the top of the page
+Quote Post
luckyluc
post 21.06.2006, 22:07:55
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 snitch.gif Problem byl przy window.open powinno byc okno = window.open Proponuje przeniesc ten temat do gotowych skryptow. Pozdrawiam.



<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
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 13:10