3
I have this form and would like to give a GET
for variables with their value when clicking the button, without refreshing the page because I have other forms on the same page, it is possible with PHP, or have to use AJAX ?
Form layout
HTML
<div class="form-group">
<div class="col-sm-7">
<label for="inputEmail3" class="control-label" contenteditable="true">
Espaçamento entre linhas(metros):
</label>
</div>
<div class="col-sm-10">
<input type="text" class="input-mini" placeholder="1" id="linhas" value="1" disabled>
</div>
</div>
<div class="form-group">
<div class="col-sm-7">
<label for="inputPassword3" class="control-label">
Espaçamento entre plantas(metros):
</label>
</div>
<div class="col-sm-10">
<input type="text" class="input-mini" id="plantas" placeholder="1" value="1" disabled>
</div>
</div>
<div class="form-group">
<div class="col-sm-6">
<label for="inputPassword3" class="control-label">
Tamanho da área a ser plantada:
</label>
</div>
<div class="col-sm-10">
<p>
<input type="text" class="input-mini" id="tamanho">
<select class="selectpicker">
<option>ha</option>
<option>m²</option>
</select>
</p>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<div class="checkbox">
<label>
<button type="submit" class="btn btn-default">Estimar</button>
</label>
</div>
</div>
</div>
</form>
Want to reload the page when you click on
Estomar
or want to send this data to PHP without refreshing the page? (Also put your HTML please)– Sergio
I don’t think I expressed myself well, I will edit the post. Obg
– Rodolfo Oliveira
Unless this is in an iframe you will need AJAX. Which prefer?
– Sergio
I prefer AJAX, because I don’t know how to work with Iframe,
– Rodolfo Oliveira
And use Mootools, jQuery or another library or it has to be pure Javascript?
– Sergio
The only framework I’m using is bootstrap, it might be jquery yes, no problem
– Rodolfo Oliveira