Jump to content
xhpotterx

[Resolvido] Form dentro de um form mas oculto

Recommended Posts

xhpotterx

Boas pessoal vinha aqui perguntar se e possível eu ter o meu formulário principal e nesse form ter outro for mas oculto (ou uma cena parecida), onde tinha uma seta e quando clicasse la esse form que esta oculto aparecia, e peritia ser preenchido.

Obrigado espero respostas

Cumpz

Share this post


Link to post
Share on other sites
rezanov

outro form dentro de um form ? nested ? isso não podes. podes ter partes "escondidas" dentro de um div e torná-las visivéis com javascript por exemplo.

Share this post


Link to post
Share on other sites
rezanov
<html>
<head>
   <title>Javascript Div Collapse Style Using Display None</title>



   <script language="javascript" type="text/javascript">
   function displayDiv()
   {
       var divstyle = new String();
       divstyle = document.getElementById("div1").style.display;
       if(divstyle.toLowerCase()=="block" || divstyle == "")
       {
           document.getElementById("div1").style.display = "none";
       }
       else
       {
           document.getElementById("div1").style.display = "block";
       }
   }
   </script>


</head>
<body>
<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
<div id="div1">
Last name 2: <input type="text" name="lastname2">
</div>
</form>

<input type="button" value="display Div" onclick="displayDiv()" />

</body>
</html>

Edited by brunoais
geshi

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.


×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.