I have some javascript that submits to an HTML form in my app upon a “click” event like so….
google.maps.event.addListener(marker, 'click', function() {
$('form').submit()
});
However I want to change the data before I send it. Is this possible? I don’t want to use Ajax $.post if I can help it. I just want to change what the form sends to my Rails controller before submit.
Thanks!
If you already have a field with name=”search” you can change it’s value like so:
Or if not:
Assuming
place.nameis known like in your previous question.