Page 1 of 1
Display / Hide
Posted: Sat Jun 18, 2005 8:28 pm
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?
moethod
Posted: Sun Jul 03, 2005 11:09 am
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
Posted: Fri Feb 24, 2006 9:05 am
by kaos_frack
how about this:
[elem].style.visibilty = "hidden";
[elem].style.visibilty = "visible";
Posted: Sun Mar 19, 2006 7:27 am
by boyvnca
kaos_frack wrote:how about this:
[elem].style.visibilty = "hidden"].style.visibilty = "visible";
what is this, can you explain more ?
Posted: Mon Jul 31, 2006 10:31 am
by mody
you can do that by write how about this:
[elem].style.visibilty = "hidden";
[elem].style.visibilty = "visible";
Posted: Wed Mar 14, 2007 4:59 am
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?