Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Nie działa okno Show
_Martin_
post 3.02.2009, 16:37:28
Post #1





Grupa: Zarejestrowani
Postów: 352
Pomógł: 9
Dołączył: 16.09.2005
Skąd: Rybnik

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


Witam

Mam skrypt który po kliknicu w link pokazuje okno z wybranymi przezemnie rzeczami które są potem niżej w div

Oto skrypt:

  1. <?php
  2. function showAtCursor(o, iShowingTime, behind) {
  3.    if (oShowedAtCursor) {
  4.        oShowedAtCursor.style.display = 'none';
  5.    }
  6.    
  7.    iShowedAtCursorShowingTime = iShowingTime;
  8.    
  9.    var o = document.getElementById(o);
  10.    oShowedAtCursor = o;
  11.    o.style.display = '';
  12.    o.style.top = tempY-10;
  13.    o.style.left = tempX-10;
  14.    if (behind) {
  15.        o.style.top = tempY+10 - o.offsetHeight;
  16.    }
  17.    o.style.position = 'absolute';
  18.    o.onclick = new Function("this.style.display = 'none';");
  19.    o.onmousemove = new Function("iShowedAtCursorLastActivity = (new Date()).getTime()");
  20.    
  21.    document.body.appendChild(o);
  22. }
  23. ?>


To skrypt js który pokazuje

Kod do wyświetlania linku:
  1. <?php
  2. <a href="java script:showAtCursor('options'.$aRow['id']. '',10);"><span class="pointer">++</span></a>
  3. ?>


A To w div co ma wyświetlać po kliknięciu w ten ++
  1. <?php
  2. <div class="sheet-pop" id="options'.$aRow['id'].'" style="display: block">
  3.                        <div class="sheet-text">
  4.                            <h4>Opcje:</h4>
  5.                            <div>
  6.                                <span class="pointer">+</span>
  7.                                <a href="?str=zgloszenia&cmd=activate&id='.$aRow['id'].'&panel=1">Aktywuj</a> <br />
  8.                                <span class="pointer">+</span>
  9.                                <a href="?str=zgloszenia&cmd=unactivate&id='.$aRow['id'].'&panel=1">Usuń</a>
  10.                            </div>
  11. ?>


CO TU NIE DZIAŁA?
już mówie wszystko smile.gif
Tzn na firefox ok na IE I OPera nie działa ta funkcja smile.gif


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


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: 14.08.2025 - 12:02