I have 'Create room' form:
<div class="contentHolder">
<div class="row no-margin">
<div class="col-sm-offset-3 col-sm-6 col-xs-12">
<g:form action="save" controller="roomLocation">
<g:render template="form" model="[roomLocation:roomLocation]"/>
<div class="row form-row">
<div class="col-md-offset-8 col-md-4 col-xs-12">
<div class="form-buttons">
<g:submitButton name="create" style="width:100%" class="btn btn-purple" value="Create" />
</div>
</div>
</div>
</g:form>
</div>
</div>
</div>
that renders form of inputs:
<div class="row form-row required">
<label class="labelStyle col-md-4 text-align-xs">Location</label>
<div class="col-md-8">
<input id="inputName" placeholder="Location" class="form-control" name="name" value="${roomLocation?.name}" required>
</div>
</div>
As you can see on first form, the subbmision is made over button create, but the whole page is refreshed and i want to use ajax so that the submision is made without refreshing whole page. I am new at this, and i would appreciate any help regarding this.