anonīms Posted November 7, 2008 Report Share Posted November 7, 2008 JS: function raadiit_submit() { if($("#turnirs").val() == '' && $("#karte").val() == '' && $("#km1_rez").val() == '' && $("#km2_rez").val() == '') { $("#raadiit_submit").show(); } } PHP <input type="text" size="1" name="km1_rez" id="km1_rez" onblur="raadiit_submit();" /> <input type="text" size="1" name="km2_rez" id="km2_rez" onblur="raadiit_submit();" /> <select name="karte" id="karte" onblur="raadiit_submit();" > ... </select> <select name="turnirs" id="turnirs" onblur="raadiit_submit();" > ... </select> .... <tr><td><div id="raadiit_submit" style="display:none"><input type="submit" value="aa" /></div></td></tr> Ideja ir tāda, ka ja visi šie nepieciešamie lauciņi ir aizpildīti, tad tikai parādas submit poga un var submitot. Problēma - pēc lauku aizpildīšanas submit poga neparādas. Link to comment Share on other sites More sharing options...
andrisp Posted November 7, 2008 Report Share Posted November 7, 2008 Nu tu jau pārbaudi ar == nevis !=. Link to comment Share on other sites More sharing options...
anonīms Posted November 7, 2008 Author Report Share Posted November 7, 2008 (edited) ups! :D Bet nu tāpat aizpildu tikai km1_rez un km2_rez un submit poga parādas, kaut arī selektā nekas nav izvēlēts (selecta 1 options ir <option>- - Choose blabla --</select>) Viss ok. <option value="" biju aizmirsis Edited November 7, 2008 by anonīms Link to comment Share on other sites More sharing options...
andrisp Posted November 7, 2008 Report Share Posted November 7, 2008 Ja <option> elementam nav norādīts value atribūts, tad kā value tiek izmantots <option> saturs. Link to comment Share on other sites More sharing options...
anonīms Posted November 7, 2008 Author Report Share Posted November 7, 2008 Ok, tagad zināšu. Link to comment Share on other sites More sharing options...
Recommended Posts