Current location: Hot Scripts Forums » General Web Coding » JavaScript » un-hiding a html element...


un-hiding a html element...

Reply
  #1 (permalink)  
Old 04-14-07, 11:04 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
Question un-hiding a html element...

hi,

for a program of mine i have a form that pop-up to include files. but im trying to figure out how to make it so that the main form will show the item after the pop-up form completes.

a good example of what I wish to do is how vbulletin handles attachments.

what i had in mind was adding a div tag and have css hide it and then the pop-up form will un-hide the hidden div tag after it has processed everything.

i hope anyone understood what I'm going after, if not let me know and I'll try to re-phase.

much thanks
Reply With Quote
  #2 (permalink)  
Old 04-15-07, 03:19 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
Javascript Code:
  1. function unhide(){
  2.   document.getElementById('my_div').style.display = 'block';
  3. }
  4.  
  5. function hide(){
  6.   document.getElementById('my_div').style.display = 'none';
  7. }

HTML Code:
<div id="my_div" style="display:none">Some contents here</div>

<button type="button" onclick="hide()">Hide div</button> - <button type="button" onclick="unhied()">Show div</button>
this should do. The css display setting will hide the div when it is set to none, and show it when it is set to block

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 04-15-07, 07:45 AM
darkcarnival's Avatar
darkcarnival darkcarnival is offline
PHP/MySQL coder
 
Join Date: Jun 2003
Posts: 939
Thanks: 0
Thanked 0 Times in 0 Posts
alright

thank you very much for this.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
html tutoral thefrtman HTML/XHTML/XML 5 04-27-09 10:25 AM
HTML Form 1 -> Perl -> return response to HTML form 2 Oleks Perl 13 10-18-06 04:59 PM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
I most definately suggest DevelopingCentral.com For Any Website Design/Development! Salty777 General Advertisements 2 10-01-04 04:27 AM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM


All times are GMT -5. The time now is 11:26 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.