jquery - Send post data to iframe and reload the iframe -
i tried something using jquery, failed.
$.ajax({ type: "post", url: "myphphere.php", data: { command: $('#command').var() } });
i thought refreshing page using onclick attribute of button submit form.
why use target
attribute in form?
<form action="..." target="an_iframe" type="post"> <input type="text" name="cmd" placeholder="type command here..." /> <input type="submit" value="run!" /> </form> <iframe id="an_iframe"></iframe>
hope solved problem.
Comments
Post a Comment