Question:
Can this be done in HTML?
Chris
2012-07-23 13:39:49 UTC
I have a sign-up button on my website and when the button is clicked I would like a form to appear and hide the button without loading a new page. Can this be done in HTML or how else could I do it? What's it called, i'm not sure what to google.

Thanks!
Five answers:
anonymous
2012-07-23 14:29:12 UTC
I answered a similar question yesterday. Here's the code snippet as an example (doesn't hide button):













HIDDEN DIV





HELLO







PS: The JS part should be in a function called by the button, it's better practice, but I just went with the asker's code
?
2012-07-23 20:47:10 UTC
It can't be done purely with HTML...there would have to be some Javascript involved, but it's actually pretty simple by using Javascript and HTML to set the "hidden" attribute of whatever element (I would put it in a
) to false after the button is clicked.
galt_57
2012-07-23 21:35:54 UTC
If you are experienced with Java you might want to look at JSP and Servlets. Javascript can do some very useful things related to what the browser displays and reacting to mouse events but it is a client-side language. Javascript can't save data on a webpage.
godfatherofsoul
2012-07-23 20:45:45 UTC
Look at Javascript to dynamically alter a web page.
Mark
2012-07-23 20:43:06 UTC
I think so..


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...