Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Dodawanie do marginLeft i marginTop
-arrtxp-
post
Post #1





Goście







MAM TAKIE COŚ
chciałem zrobić aby mi dodawało do margin liczbę 32 lecz nie wychodzi wie ktoś może czemu?
o to kawałek kodu, który za to odpowiada (IMG:style_emoticons/default/tongue.gif)

  1. var ruch = 0;
  2. var topMargin = document.getElementById('map').style.marginTop;
  3. var leftMargin = document.getElementById('map').style.marginLeft;
  4. var pole = "32";
  5. function Move_map(x, y, licz) {
  6. if(isNaN(parseInt(licz))) { if(ruch > 0) return;
  7. window.frames['view_info'].location= "poruszanie.php?x=" + x + "&y=" + y + "";
  8. licz = 0;
  9. }
  10. ruch = 1;
  11. document.getElementById('map').style.marginTop = topMargin+pole;
  12. document.getElementById('map').style.marginLeft = leftMargin+pole;
  13. if(licz < 33) {
  14. licz++;
  15. setTimeout("Move_map(" + x + ", " + y + ", " + licz + ")", 15);
  16. }
  17. else ruch = 2;
  18. }


Ten post edytował arrtxp 15.01.2010, 12:17:04
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: 15.09.2025 - 18:10