Display / Hide

Any problem with javascript can be discussed here.
Post Reply
User avatar
Lisk
Posts: 327
Joined: Sat Mar 05, 2005 4:47 pm
Contact:

Display / Hide

Post by Lisk »

<script language='JavaScript'>function swap_content(span) {displayType=(****.getElementById(span).style.display=='none') ? 'block':'none';****.getElementById(span).style.display=displayType;}</script>

Something
<span id="0007" style="display: none">
something inside :/

</span>


this one displays when it's hidden(none) and vica versa.
I need 2 functions.
1st opens
2nd closes
(seperate)

why doesn't it work in firefox?


serkon
Posts: 4
Joined: Sun Jul 03, 2005 10:41 am

moethod

Post by serkon »

when you use below will not display
****.getElementById(span).style.display=='none'

whan you use it you can see your span tag
****.getElementById(span).style.display==''

an use input **** properties or span, send that your function
ok
kaos_frack
Posts: 504
Joined: Sat May 07, 2005 8:03 am
Contact:

Post by kaos_frack »

how about this:
[elem].style.visibilty = "hidden";
[elem].style.visibilty = "visible";
boyvnca
Posts: 170
Joined: Mon Mar 13, 2006 10:46 pm

Post by boyvnca »

kaos_frack wrote:how about this:
[elem].style.visibilty = "hidden"].style.visibilty = "visible";
what is this, can you explain more ?
mody
Posts: 26
Joined: Mon Jul 24, 2006 2:51 am
Contact:

Post by mody »

you can do that by write how about this:
[elem].style.visibilty = "hidden";
[elem].style.visibilty = "visible";
dexter
Posts: 32
Joined: Fri Mar 09, 2007 1:18 pm

Post by dexter »

Lisk wrote:<script language='JavaScript'>function swap_content(span) {displayType=(****.getElementById(span).style.display=='none') ? 'block':'none';****.getElementById(span).style.display=displayType;}</script>Something<span id="0007" style="display: none">something inside :/</span>this one displays when it's hidden(none) and vica versa.I need 2 functions. 1st opens2nd closes (seperate)why doesn't it work in firefox?
what was his function?
Post Reply