Hi
I use the following script in order to show/hide a section, and at the same
time to change a companion .gif with another:
function doExpand(paraNu m,arrowNum){
if
(paraNum.style. display=="none" ){paraNum.style .display="";arr owNum.src="../../images/arrOn.gif"}
else {paraNum.style. display="none"; arrowNum.src=". ./../images/arrOff.gif"}
}
and then in the body:
<div id="reltpc"><a href="javascrip t:;" onClick="doExpa nd(xplan1,ico1) "><img
id="ico1" src="../../images/arrOff.gif" alt="" width="10" height="9"
border="0"> Show Info</a></div>
<div id="xplan" style="display: none" onClick="doExpa nd(xplan,ico1)" >
<p>text here</p>
<p>some more text here</p>
</div>
Furthermore, two more scripts are used in order to show/hide a section
without the image:
function doSection (secNum){
if (secNum.style.d isplay=="none") {secNum.style.d isplay="block"}
else{secNum.sty le.display="non e"}
}
function noSection (secNum){
if (secNum.style.d isplay=="block" ){secNum.style. display="none"}
}
and then in the body:
<div id="more"><a href="javascrip t:;" onClick="doSect ion(dtails1)">M ore
Info</a></div>
<div id="dtails1" style="display: none" onClick="noSect ion(dtails1)">
<p>text here</p>
<p>some more text here</p>
</div>
All three of them are working good in IE and Ffox, however the second claims
to use "gelElementById " instead.
Well, how could it be done? Would you help me please, to get that
conversion?
Thanks.
--
Merlin dying to the Lady of the Lake:
"We lived our lives with passion and devotion"
--
Please, remove hyphens to contact me
I use the following script in order to show/hide a section, and at the same
time to change a companion .gif with another:
function doExpand(paraNu m,arrowNum){
if
(paraNum.style. display=="none" ){paraNum.style .display="";arr owNum.src="../../images/arrOn.gif"}
else {paraNum.style. display="none"; arrowNum.src=". ./../images/arrOff.gif"}
}
and then in the body:
<div id="reltpc"><a href="javascrip t:;" onClick="doExpa nd(xplan1,ico1) "><img
id="ico1" src="../../images/arrOff.gif" alt="" width="10" height="9"
border="0"> Show Info</a></div>
<div id="xplan" style="display: none" onClick="doExpa nd(xplan,ico1)" >
<p>text here</p>
<p>some more text here</p>
</div>
Furthermore, two more scripts are used in order to show/hide a section
without the image:
function doSection (secNum){
if (secNum.style.d isplay=="none") {secNum.style.d isplay="block"}
else{secNum.sty le.display="non e"}
}
function noSection (secNum){
if (secNum.style.d isplay=="block" ){secNum.style. display="none"}
}
and then in the body:
<div id="more"><a href="javascrip t:;" onClick="doSect ion(dtails1)">M ore
Info</a></div>
<div id="dtails1" style="display: none" onClick="noSect ion(dtails1)">
<p>text here</p>
<p>some more text here</p>
</div>
All three of them are working good in IE and Ffox, however the second claims
to use "gelElementById " instead.
Well, how could it be done? Would you help me please, to get that
conversion?
Thanks.
--
Merlin dying to the Lady of the Lake:
"We lived our lives with passion and devotion"
--
Please, remove hyphens to contact me
Comment