javascript - post form input to an iframe on onchange of a select -
using html, css , js, have form containing select , submit - works great.
however, want when select's onchange triggered, option posted page, inside iframe.
meaning when option 'red' selected in 'color' dropdown, i'll able display in iframe /changed?color=red, using post.
however original form has action target can't through simple submit. should do?
use "onsubmit" on form
<script> function myfunction(){ // open iframe } </script> <form onsubmit="myfunction()" action="..."> enter name: <input type="text"> <input type="submit"> </form>
Comments
Post a Comment