Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [js] problem z createElement (?)
fx69
post 26.11.2006, 18:23:42
Post #1





Grupa: Zarejestrowani
Postów: 40
Pomógł: 0
Dołączył: 8.10.2006
Skąd: świat astralny

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


  1. <?php
  2. var result = document.createElement('span');
  3. result.innerHTML = tablica_wynikow[i];
  4. result.onmouseover = highlight();
  5. result.onmouseout = unHighlight();
  6. result.onmousedown = selectEntry();
  7. pole_div.appendChild(result);
  8.  
  9. ...
  10.  
  11.  function highlight (){ this.className = 'highlight'; }
  12.  function unHighlight () { this.className = ''; }
  13.  function selectEntry () {
  14. $('towar').value = this.innerHTML;
  15.  }
  16. ?>


dlaczego te funkcje nie dzialaja ? w polu o id="towar" wyswietla sie napis "undefined" zaraz po wpisaniu jakichkolwiek znakow...
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: 12.06.2025 - 22:19