Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Czysczenie pola INPUT TEXT po zaznaczeniu checkboxa, jak zastosować...
progman
post
Post #1





Grupa: Zarejestrowani
Postów: 36
Pomógł: 0
Dołączył: 6.07.2006

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


Potrzebuję zrobić czyszczenie pola INPUT TEXT po zaznaczeniu checkboxa, poniżej kod .js który robi mi po zaznaczeniu go (disable INPUT TEXT`a).

  1. <?php
  2. print "<script LANGUAGE="JavaScript">";
  3. print "function func() {";
  4. print "if(document.getElementById('blok').checked == true) {";
  5. print "document.getElementById('timestamps').disabled = false;";
  6.  print "}";
  7.  print "else document.getElementById('timestamps').disabled = true;";
  8.  print "document.getElementById('timestamps').text.value='';";
  9. print "}";
  10. print "</script>";
  11. ?>


Zastosowałem

  1. <?php
  2. print "document.getElementById('timestamps').text.value='';";
  3. ?>


ale bez efektu.

EDIT: Rozwiązanie stało się proste smile.gif

  1. <?php
  2. print "document.getElementById('timestamps').value='';";
  3. ?>


Ten post edytował progman 17.08.2006, 11:49:11
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 Aktualny czas: 21.08.2025 - 21:42