I have an iframe like this:
<iframe name="report-iframe" id="report-iframe" src="https://reporting.com/embed" width="100%" height="300" frameborder="0"></iframe>
I want to replace the src value using values from a form
<form method="post" target="report-iframe">
<input id="form-type" name="form-type" type="text" />
<input id="form-date" name="form-date" type="date" />
<input type="button" value="Update Report" onclick="javascript_function()"/>
</form>
so the resulting source of the iframe is:
src="https://reporting.com/embed?param_type=form-type¶m_date=form-date"
Then reload the iframe with the passed parameters.
I want to do this using only javascript/jquery if possible.