I got a problem with contact form that I created using Bootstrap. I need to create submit button that will TRY to send all data from this form using AJAX, but I have to do this without any of javascript frameworks or libraries (this is my homework for school so yeah I really cannot use them... ).
I have no idea how to do this without jQuery so any help will be greatly appreciated.
<div class="container">
<form class="form-horizontal" role="form">
<div class="form-group">
<label class="control-label col-sm-2" for="usr">Name:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="usr" placeholder="Enter name" value="" aria-describedby="name-format" required aria-required=”true” pattern="[A-Za-z-0-9]+\s[A-Za-z-'0-9]+" title="firstname lastname">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="email">Email:</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="email" name="email" placeholder="Enter email" required>
</div>
</div>
<div class="form-group">
<label for="comment">Message:</label>
<textarea class="form-control" rows="5" id="comment"></textarea>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-2 pull-right">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</div>