Forms and Iframes

Asked

Viewed 66 times

2

It is possible to use a <iframe> within a <form>?

I’m making a code where I step one id in <div> and within a <form> with another id, thus within the <form> want to call a <iframe> where is my content.

Shortcode:

<tr>
    <td height="300" width="" class="tb-conteudo" colspan="4" align="left" valign="top" >  
        <div id="div_usua" class="conteudo" style="display: none; padding-top:5px;">
            <form id="form_usua">
                <table align="left" border="0" width="2%">
                    <tr>
                        <td>
                            <iframe style="border-radius:20px;" scrolling="no" src="../sai_cada_usua/menu_com_abas_usua.php" width="900" height="400" >
                            </iframe>
                        </td>
                    </tr>
                </form> 
            </table>
        </div>
    </td>
</tr>   

Complete code : JSF

1 answer

4


In relation to your question:
"Is it possible to use one inside a ?" the answer is: depends on what you want to do.

If you want to insert data within the iframe and want it to be collected by the form when you submit it, then the answer is nay.

If the question is only technical, i.e., whether you can have an iframe within a form to show content or advertising, the answer is yes.

However, if the content of the iframe is in the same domain, it would be better to use AJAX to load the content into the same page, instead of using and creating another page/session (which is what iframe does).

  • 1

    thanks, took out the doubt I had in mind!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.