I am trying to submit a form from a JSP page to a servlet. I am trying to make a dynamic page, where a form opens up on press of a button and send the data when the form is submitted. When the form is submitted the popup form closes and returns to the main page. I have implemented the form, and the popup form closes when i click on post but the data is not sent to the servlet.
Code of form:
<div class="form-group">
<label for="select" class="col-lg-2 control-label">Technology</label>
<select class="form-control" id="select">
<option>Java</option>
<option>C++</option>
<option>C</option>
<option>Python</option>
<option>.Net</option>
<option>Javascript</option>
</select>
<br> <label for="select" class="col-lg-2 control-label">Query</label>
<textarea class="form-control" rows="3" id="textArea"></textarea>
</div>
<div class="modal-footer">
<button type="reset" class="btn btn-default"
data-dismiss="modal">Close</button>
<button type="submit" id="pst" class="btn btn-primary"
data-dismiss="modal">Post</button>
</div>
I tried to go to the send to the servlet via different solutions provided over the web, but nothing seems to work. The function is being called since i tried doing an alert inside the onclick function, the alert did show but nothing else. Any Suggestions?