link an iframe with an HTML form

2

I'm wanting to show a website inside an entry in wordpress, which is inside an iframe, which I want you to do a form but not link them so that the form makes its function within the iframe's website, look my code.

<p>
    <iframe  style="margin-right:auto; margin-left:auto; display: block;" name="webs" src="https://downace.com/login.html" frameborder="0" marginwidth="1" marginheight="0" width="535" height="430"></iframe>
    <form method="post" action="https://downace.com/login.html" target="webs">
        <input id="username" class="uk-width-1-1" placeholder="Username" name="username" type="text" value="antoniovm99" >
        <input id="password" class="uk-width-1-1" placeholder="Password" name="password" type="password" value="********">
        <input type="hidden" value="1" name="submitme">   
    </form>
</p>
    
asked by antoniovm99 08.09.2017 в 06:56
source

1 answer

2

The only thing you need to make it work is a input of type submit :

<form method="post" action="https://downace.com/login.html" target="webs">
  <input id="username" class="uk-width-1-1" placeholder="Username" name="username" type="text" value="antoniovm99" />
  <input id="password" class="uk-width-1-1" placeholder="Password" name="password" type="password" value="********">
  <input type="hidden" value="1" name="submitme" />
  <!-- Este input es importante para disponer de un botón de envío -->
  <input type="submit" value="Entrar" />
</form>
<iframe style="margin-right:auto; margin-left:auto; display: block;" name="webs"
  src="https://downace.com/login.html" frameborder="0" marginwidth="1" marginheight="0"
  width="535" height="430"></iframe>
    
answered by 08.09.2017 в 08:03