469,338 Members | 8,430 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

Need help, making a form appear on mouse click

kestrel
1,071 Expert 1GB
Hey,
i need to make something that has a button, then when you click on it, in the same place a form i made will appear, i need it to stay in the same place in the page, in a table.
is that possible?
thanks
Jul 7 '06 #1
3 3475
iam_clint
1,208 Expert 1GB
completely possible use a span and javascript to change innerhtml on click
Jul 15 '06 #2
iam_clint
1,208 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function swapform() {
  3.     var visable
  4.     var hidden
  5.     visable = document.getElementById("visible").innerHTML;
  6.     hidden = document.getElementById("theform").innerHTML;
  7.     document.getElementById("visible").innerHTML = hidden;
  8. }
  9. </script>
  10.  
  11. <div id="visible">
  12. <input type="button" value="change form" onclick="swapform();">
  13. </div>
  14.  
  15.  
  16. <div id="theform" style="visibility: hidden">
  17. <form action="blah.asp" method="post">
  18. <table>
  19. <tr><td><input type="text" value="Insert Name">
  20. <tr><Td><input type="submit" value="rub a dub">
  21. </table>
  22. </form>
  23. </div>
  24.  
heres an example i made for you using a hidden div hope this helps you out.
Jul 15 '06 #3
kestrel
1,071 Expert 1GB
thanks, perfect!
Jul 28 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Eric Kiernan | last post: by
8 posts views Thread by George Hester | last post: by
18 posts views Thread by Jan Nielsen | last post: by
53 posts views Thread by souporpower | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Purva khokhar | last post: by
1 post views Thread by haryvincent176 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.