HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 19th, 2012, 04:04 PM
tyler_long_sim tyler_long_sim is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 13 tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 h 23 m 4 sec
Reputation Power: 0
Making a form disapear

how can you make it so a form disappears when you click a button and the contents underneath the form rises up to the top(to where the form was).

Reply With Quote
  #2  
Old November 19th, 2012, 04:34 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,898 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 19 h 7 m 36 sec
Reputation Power: 1798
The easy way is using jQuery. Look at jQuery's .slideUP() and .slideDown() functions.

Reply With Quote
  #3  
Old November 19th, 2012, 05:15 PM
tyler_long_sim tyler_long_sim is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 13 tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level)tyler_long_sim User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 h 23 m 4 sec
Reputation Power: 0
Quote:
Originally Posted by Catacaustic
The easy way is using jQuery. Look at jQuery's .slideUP() and .slideDown() functions.


could i have a code example?

Reply With Quote
  #4  
Old November 19th, 2012, 05:21 PM
Catacaustic's Avatar
Catacaustic Catacaustic is offline
Code Monkey V. 0.9
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2005
Location: A Land Down Under
Posts: 1,898 Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level)Catacaustic User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Weeks 4 Days 19 h 7 m 36 sec
Reputation Power: 1798
Sure. There's a lot on the jQuery website . All you have to do is put in a tiny amount of effort to search for them yourself.
Comments on this post
sir_drinxalot agrees: yeah but where is the fun in that??

Reply With Quote
  #5  
Old November 20th, 2012, 09:28 PM
BarryG BarryG is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: Sydney Australia
Posts: 134 BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level)BarryG User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 10 h 2 m 37 sec
Reputation Power: 83
Quote:
Originally Posted by tyler_long_sim
could i have a code example?


Here you go, without jQuery.

Code:
<!doctype html>

<html>
<head>
<title>Disappearing form</title>
<script type='text/javascript'>
function toggle_hide(element) {
	if ( document.getElementById(element).className == "visible") {
		document.getElementById(element).className = "invisible";
		}
	else {
		document.getElementById(element).className = "visible";
	}
	}
</script>
<style type='text/css'>
.visible {
	display:block;
	}
.invisible {
	display:none;
	}
</style>

</head>
<body>
<form method='post' action='#' id='form1' name='form1' class="visible">
<input type="text" size='10' value="text input">
</form>
<form method='post' action='#' id='form2' name='form2'>
<input type='button' value="Toggle form" onclick='toggle_hide("form1")'>
</form>
</body>
</html>


Click the "Toggle form" button to hide/unhide the form called 'form1'

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Making a form disapear

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap