Jump to content
Fórum Script Brasil
  • 0
jesle4ycarlot

Iframe Login Automatico

Question

3 answers to this question

Recommended Posts

  • 0

Tenta assim:

<style>
    form {
        display: none;
    }
    iframe {
        width: 100%;
        height: 100%;
        border: none;
    }
</style>
<form action="https://sistema.startpesquisa.com.br/j_security_check" method="post" target="my_iframe">
    <input type="hidden" name="j_username" value="asd">
    <input type="password" name="j_password" value="asd">
</form>
<iframe name="my_iframe" src="not_submitted_yet.aspx"></iframe>
<script>
    document.querySelector('form').submit();
</script>

 

Share this post


Link to post
Share on other sites
  • 0
1 hora atrás, Leonardo Persan disse:

Tenta assim:

<style>
    form {
        display: none;
    }
    iframe {
        width: 100%;
        height: 100%;
        border: none;
    }
</style>
<form action="https://sistema.startpesquisa.com.br/j_security_check" method="post" target="my_iframe">
    <input type="hidden" name="j_username" value="asd">
    <input type="password" name="j_password" value="asd">
</form>
<iframe name="my_iframe" src="not_submitted_yet.aspx"></iframe>
<script>
    document.querySelector('form').submit();
</script>

 

Salve meu amigo, esse codigo quando incorporo ele no wordpress retorna resultado de busca, como se tive sido feito uma busca, vou colcoar aqui o codigo que funcionou para mim, mas não sei como fazer pro iframe funcionar:

 

<form id="login" target="frame" method="post" action="https://sistema.startpesquisa.com.br/j_security_check">
    <input type="hidden" name="j_username" value="000000">
    <input type="hidden" name="j_password" value="111111>
    
 
<iframe id="frame" name="frame" width="650" height="400"></iframe>

<script type="text/javascript">
    // submit the form into iframe for login into remote site
    document.getElementById('login').submit();
</script>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Forum Statistics

    • Total Topics
      148079
    • Total Posts
      643267
×
×
  • Create New...