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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -