Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [js]Okreslanie pozycji pola input
skowron-line
post
Post #1





Grupa: Zarejestrowani
Postów: 4 340
Pomógł: 542
Dołączył: 15.01.2006
Skąd: Olsztyn/Warszawa

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


Witam mam takie pytanie jak automatycznie okreslic pozycje pola input zeby móc pod nim wyswietlić div z podpowiedziami??
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
zbig
post
Post #2





Grupa: Zarejestrowani
Postów: 144
Pomógł: 30
Dołączył: 5.05.2007
Skąd: Mannheim

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


  1. function findPos(obj)
  2. {
  3. var curleft = curtop = 0;
  4. if (obj.offsetParent) {
  5. curleft = obj.offsetLeft
  6. curtop = obj.offsetTop
  7. while (obj = obj.offsetParent) {
  8. curleft += obj.offsetLeft
  9. curtop += obj.offsetTop
  10. }
  11. }
  12.  
  13. return [curleft,curtop];
  14. }


pozdrawiam
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 11.10.2025 - 13:27