Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> INPUT TEXTAREA <<<<< walidacja
magier123
post
Post #1





Grupa: Zarejestrowani
Postów: 80
Pomógł: 0
Dołączył: 27.03.2007

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


Witam!
Nie mam bladego pojecia o javie wiec pytam....
Jak w zwyklym formularzu zrobic tak zeby dopiero po wpisaniu w zwyklym polu input mozna bylo wpisac cos do texarea??
Po prostu po uzupelnieniu input odblokowac textarea.... Dzieki z gory za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
tommy4
post
Post #2





Grupa: Zarejestrowani
Postów: 288
Pomógł: 12
Dołączył: 2.12.2005

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


  1. <script type="text/javascript">
  2. function make_change(th, col1, col2)
  3. {
  4. var textarea = document.getElementById('farea');
  5. if(th.value.length > 0)
  6. {
  7. textarea.disabled = false;
  8. textarea.style.backgroundColor = col1;
  9. }
  10. else
  11. {
  12. textarea.disabled = true;
  13. textarea.style.backgroundColor = col2;
  14. }
  15. }
  16. <input id="ftext" onkeyup="make_change(this, '#FF0000', '#FFFFFF');" /><textarea id="farea" disabled="disabled" style="background-color: #ffffff;"></textarea>
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: 9.10.2025 - 04:13