Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [XHTML][CSS] Scroll.
Predator446
post
Post #1





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 16.04.2006

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


Witam,
Jak zrobić by boczny scroll w divie po wejściu na stronę był automatycznie na dole?
Pozdrowienia...
Go to the top of the page
+Quote Post
biopaliwo
post
Post #2





Grupa: Zarejestrowani
Postów: 15
Pomógł: 0
Dołączył: 5.08.2007

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


http://radio.javaranch.com/pascarello/2005...34573598403.htm
i tylko dadać to do obsługi zdarzenia window.onload
no i uwzględnić różnice w IE i geco :-)
Go to the top of the page
+Quote Post
Predator446
post
Post #3





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 16.04.2006

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


W linku do strony którą podałeś:

Page not found

A page that you are trying to request cannot be found.

:/

Może napiszesz na forum jak to zrobić?
Go to the top of the page
+Quote Post
nospor
post
Post #4





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Link jest zly, brakkuje l:
http://radio.javaranch.com/pascarello/2005...4573598403.html

A tu masz kod js:
Kod
var objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;


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

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
Predator446
post
Post #5





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 16.04.2006

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


Wstawiłem ten kod na stronę lecz nie ma rezultatu :/
Go to the top of the page
+Quote Post
loonger
post
Post #6





Grupa: Zarejestrowani
Postów: 104
Pomógł: 0
Dołączył: 19.06.2006
Skąd: Wrocław

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


a czy twój div ma id "divExample" ?
Go to the top of the page
+Quote Post
biopaliwo
post
Post #7





Grupa: Zarejestrowani
Postów: 15
Pomógł: 0
Dołączył: 5.08.2007

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


sorry za link, to działa w IE i FF
CODE
window.onload = function() {
var scroll = document.getElementById('scroll');
scroll.scrollTop = scroll.scrollHeight;
}

tylko podstaw pod 'scroll' właściwe id

Ten post edytował biopaliwo 9.08.2007, 18:38:46
Go to the top of the page
+Quote Post
Predator446
post
Post #8





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 16.04.2006

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


no wstawiam, zmieniam id i nic scroll po załadowaniu strony jest na gorze...
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 Aktualny czas: 19.08.2025 - 15:44