I am junior developer and got stucked with such problem: Laravel brings me back an error: "Use of undefined constant input - assumed 'input'" And I dont understand why: this variable is IN javascript code.
Here it is:
<div class="form-group">
{!! Form::label('pac-input', 'Адрес') !!}
{!! Form::text('pac-input', $meta ? $meta->pac-input:old('pac-input', null), ['class' => 'form-control', 'placeholder' => 'Введите адрес']) !!}
</div>
My input
var input = (
document.getElementById('pac-input'));
var autocomplete = new google.maps.places.Autocomplete(input);
autocomplete.bindTo('bounds', map);
My JavaScript code (google.maps.api3)
Also got a question: in the source there was a comment after "var input = /** @type {!HTMLInputElement} */( document.getElementById('pac-input'));" - what kind of HTMLInputElement this one wants?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire