minicrispie: Textfeld auf Inhalt prüfen

Beitrag lesen

Hallo,

function ShowOrHideButton(txt, btn_name) {

var btn = txt.form.elements[btn_name];

if (btn) {
    btn.style.display = (txt.value == '') ? 'none' : '';
  }
}


>   
> ~~~html

<input type="text" name="MeinTextfeld" onkeydown="ShowOrHideButton(this, 'MeinButton')" />  

> <input type="submit" name="MeinButton" value="..." />

hmm ... und was soll "txt" sein?

function ShowOrHideButton(btn_name) {

var btn = document.form.elements[btn_name];

if (btn) {
    btn.style.display = (btn.value == '') ? 'none' : '';
  }
}

  
so ist es besser glaub ich ;-)  
  
  
  
MfG. Christoph Ludwig

-- 
Wo die Sprache aufhört, fängt die Musik an...  
Selfcode:  ie:( fl:| br:^ va:| ls:/ fo:| rl:? n4:) ss:) de:] js:) ch:{ sh:) mo:) zu:)  
  
Go to [this](http://home.arcor.de/minicrispie/index.html)