I am trying to glue two web services by passing a value from one to the other, unfortunately there is no API or an explicit way to hack the search query, so I need to set the input value inside the iframe.
Here's the markup for a terrible iframe.
<form id="searchForm" method="post" action="/search/initialSearch"> <fieldset class="searchFields"> <input type="text" name="searchTerm" value=""/> <input type="submit" value="Find stops"/> </fieldset> </form>
I need to set the text searchTerm and then submit the form.
Note. This happens on a mobile phone, so I would prefer a really lightweight solution
javascript html forms iframe
Tom
source share