alexarpad2003 Posted June 6, 2011 Report Posted June 6, 2011 Am codul care imi numeroteaza clickurile :<script type ="text/javascript">var x = 0;function count() { x += 1; document.getElementById( "counting" ).value = x;}</script>Am formul de genul :<form method='post'><input name='sub' type='submit' value='schimba'/></form>Cum sa scriu conditia ca doar la a 5-a apasare a butonului sub sa-mi proceseze formul ? Quote
TheWiner Posted June 6, 2011 Report Posted June 6, 2011 Mmm... smechera chestia , dar pentru ce vreau sa aflu cate clickuri dau? Quote
alexarpad2003 Posted June 6, 2011 Author Report Posted June 6, 2011 Dar cine a zis ca vreau sa afli tu ?Mie imi trebuie conditia ca doar la a 5-a apasare sa mi se proceseze formul. Deci cand dai primu submit, al doilea submit ... sa nu se intample nimic. Quote
tromfil Posted June 6, 2011 Report Posted June 6, 2011 Cam a?a<input id="counting" value="0"/><script type ="text/javascript"> var x = 0; function count() { x += 1; if (x==5) return true; document.getElementById("counting" ).value = x; return false;} </script> <form method='post'> <input name='sub' type='submit' value='schimba' onclick="return count()" /> </form> 1 Quote