Cibiņš Posted January 11, 2013 Report Share Posted January 11, 2013 Ilgi nočakarējos tā arī nesapratu kā atraut vaļā fancybox lodziņu ja cilvēks mēģina nosubmitot tukšu formu? :/ function validateForm() { var searchform=document.forms["srchfrm"]["searchform"].value; if (searchform==null || searchform=="" || searchform=="Uzošņāt.."){ alert('Lūdzu ievadiet atslēgvārdu(-s)!'); return false; } } <form action="<?php echo $geturl; ?>" method="post" name="srchfrm" onsubmit="return validateForm()"> <input name="product" type="text" id="searchform" value="Uzošņāt.." /> <input name="submitsearch" type="submit" value="Submit" id="submit" /> </form> Uz linku padošanu ta poh elementāri uzklikšķina linku utt bet kad jāvalidē tad nez.. :/ Quote Link to comment Share on other sites More sharing options...
0 Pats Toms Posted January 11, 2013 Report Share Posted January 11, 2013 http://fancyapps.com/fancybox/ > Documentation > API methods http://jsfiddle.net/Lf4gD/ Quote Link to comment Share on other sites More sharing options...
Question
Cibiņš
Ilgi nočakarējos tā arī nesapratu kā atraut vaļā fancybox lodziņu ja cilvēks mēģina nosubmitot tukšu formu? :/
Uz linku padošanu ta poh elementāri uzklikšķina linku utt bet kad jāvalidē tad nez.. :/
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.