Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript]refresh strony po kliknięciu w a
Randallmaster
post 24.02.2013, 17:13:16
Post #1





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


Potrzebuję przeładować stronę po kliknięciu w <a> oczywiście nie był to dla mnie problem zrobiłem tak:

  1. <a href="link" class="button" onClick="window.location.reload(true)" target="_blank">


problem leży w tym że refresh powinien odbyć się w momencie załadowania strony link.

Go to the top of the page
+Quote Post
ber32
post 24.02.2013, 17:18:49
Post #2





Grupa: Zarejestrowani
Postów: 332
Pomógł: 22
Dołączył: 6.07.2010

Ostrzeżenie: (0%)
-----


Witam
opóźnij przeładownie strony np. o 5sek


--------------------
Go to the top of the page
+Quote Post
Randallmaster
post 24.02.2013, 17:20:40
Post #3





Grupa: Zarejestrowani
Postów: 677
Pomógł: 11
Dołączył: 18.11.2009

Ostrzeżenie: (0%)
-----


wiem że trzeba opóźnić ale jaką funkcja..
Go to the top of the page
+Quote Post
ber32
post 24.02.2013, 17:31:12
Post #4





Grupa: Zarejestrowani
Postów: 332
Pomógł: 22
Dołączył: 6.07.2010

Ostrzeżenie: (0%)
-----


np. taką

  1.  
  2. var t=setTimeout(function(){alert("Hello")},3000)


--------------------
Go to the top of the page
+Quote Post
wujek2009
post 24.02.2013, 17:31:18
Post #5





Grupa: Zarejestrowani
Postów: 350
Pomógł: 31
Dołączył: 23.05.2010

Ostrzeżenie: (0%)
-----


spróbuj może z timerami: http://www.w3schools.com/js/js_timing.asp
setInterval + clearInterval

lub: http://www.w3schools.com/jsref/met_win_settimeout.asp

Ten post edytował wujek2009 24.02.2013, 17:31:43
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 - 20:34