php - Calling multiple functions on "Onsubmit" -


i have form through finding distance between 2 locations. right form works fine.i have used.

<form method="get" name="f1" id="f1" class="formular" action="findcars.php" onsubmit="showlocation(); return false;"> 

now want validate form inputs.. have added function validate(); this

<form method="get" name="f1" id="f1" class="formular" action="findcars.php" onsubmit="validate(); showlocation(); return false;">   

but not working..pls..help, how should call validate() function.

thanks.

maybe try this

<form method="get" name="f1" id="f1" class="formular" action="findcars.php" onsubmit="myfunction(); return false;">  <script>     myfunction function () {     validate();      showlocation(); } </script> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -