hi if you go to <!-- w --><a class="postlink" href="http://www.apc-compunet.co.uk">www.apc-compunet.co.uk</a><!-- w --> (<!-- m --><a class="postlink" href="http://www.apc-compunet.co.uk">http://www.apc-compunet.co.uk</a><!-- m -->)
on the side in the yellow bit you will see a use of spans on mouse over.
I created that by doin this in the html form
<span onClick="document.all.email.style.display='block'" onDblClick="document.all.email.style.display='none'"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>
<span id="email">
<p> blah blah</p>
</span>
</span>
and this in the linked css form
#email {display : none;
}
as you can see this is done with a mouseover how can i get it so that it expands and closes on one click. so you click to open, then click to close.
Thanks AdamThis is more of a JavaScript question, but try this:
<span onclick="document.getElementById('email').style.display = document.getElementById('email').style.display == 'none' ? 'block' : 'none';"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>
You could also put it in a function, if you have many things to hide/display using the same method, to keep from repeating all that code over and over again, but I gave an inline example for simplicity.That works great but the first time it opens i have to click it twice ?
lol i dont quite understand it, but once it been opened once i can close and open fine. but when i refresh again i have to click it twice to open.
i dont quite understand it,
any idea'sYeah, sorry, I've had problems with that.
Try this:
<span onclick="document.getElementById('email').style.display = document.getElementById('email').style.display == 'block' ? 'none' : 'block';"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>
on the side in the yellow bit you will see a use of spans on mouse over.
I created that by doin this in the html form
<span onClick="document.all.email.style.display='block'" onDblClick="document.all.email.style.display='none'"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>
<span id="email">
<p> blah blah</p>
</span>
</span>
and this in the linked css form
#email {display : none;
}
as you can see this is done with a mouseover how can i get it so that it expands and closes on one click. so you click to open, then click to close.
Thanks AdamThis is more of a JavaScript question, but try this:
<span onclick="document.getElementById('email').style.display = document.getElementById('email').style.display == 'none' ? 'block' : 'none';"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>
You could also put it in a function, if you have many things to hide/display using the same method, to keep from repeating all that code over and over again, but I gave an inline example for simplicity.That works great but the first time it opens i have to click it twice ?
lol i dont quite understand it, but once it been opened once i can close and open fine. but when i refresh again i have to click it twice to open.
i dont quite understand it,
any idea'sYeah, sorry, I've had problems with that.
Try this:
<span onclick="document.getElementById('email').style.display = document.getElementById('email').style.display == 'block' ? 'none' : 'block';"><font color="#000066" size="3" face="Times New Roman, Times, serif">Welcome Guest</font>