Click here to Skip to main content
15,917,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
when i have click the select box, contact form submission should happen at same time.. which means selecting the select box, form submission should happen.

pls guide me for the solution

here is my code
    <option class="fix">one</option>

<form class="form-horizontal contact_form"  id="contactForm1"
name="myform"     action="Form.php" method="post"  enctype="multipart/form-data">
<input type="text">
<input type="text" placeholder="address">
<label>email id</label>
<input type="text" placeholder="email id">
<button  value="Submit" type="submit" name="submit" id="submit">submit</button>



i have tried something like this
That is $("#submit").click(); not $("#submit").onclick();.
Sanket Saxena 28-Apr-14 8:15am    
change your HTML dropdown code as below and try:<br><br>
<select class="fix"><br><br>
and js:<br>
$(document).ready(function () {<br>
$(".fix").change(function () {<br>

Solution updated.

1 solution

<script type="text/javascript">
        $(document).ready(function () {
            $(".fix").change(function () {

<select class="fix">
Share this answer
tekthiyagu 28-Apr-14 7:59am    
hi freind ,its not worked.pls check the output and send the code.

Sanket Saxena 28-Apr-14 8:08am    
Check your forms and others tags are not seems to be closed properly and then check console what is the error msg?
tekthiyagu 28-Apr-14 8:27am    
hi friend alert function is working..but form is not submitting .which means its not posting the form.php page
Sanket Saxena 28-Apr-14 8:42am    
The code here is working fine dear...are you place this code in the content page (you are using master page it seems)
tekthiyagu 28-Apr-14 8:57am    
thanks friend i got the solution happy coding

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900