Heel bedankt voor het antwoord 
Tracking the mouse position ! This is an idea.
At first, I thought that it was not applicable for my page but after some try I made it work.
it's not perfect because my site is build in a modular way and I like to keep everything related to a module in this module (here I'm obliged to put the div in the main file and also the style in the main css file) and also the popup appear at the mouse position instead of just under the text box as it was previously
Anyway, I think I can live with it as I don't have a better solution for the moment
*nb : I have rewritten some part of your code to adapt it to my particular case.
I have also added a control to avoid that the popup appear (partially) out of the visible part of the document.
Also you know that when you have a lot of "document.getElementById(which)" , you can use an object instead.
Code:
//Hide div
function hide_div(which)
{
if(document.getElementById(which).style.visibility=='visible' && document.getElementById(which).style.display!='inline-block')
{document.getElementById(which).style.visibility='hidden';document.getElementById(which).style.top='-10000px';}
else if(document.getElementById(which).style.display=='inline-block' && document.getElementById(which).style.visibility!='visible')
{document.getElementById(which).style.display='none'}
}
become
Code:
//Hide div
function hide_div(which)
{
var obj = document.getElementById(which);
if(obj.style.visibility=='visible' && obj.style.display!='inline-block')
{
obj.style.visibility='hidden';
obj.style.top='-10000px';
}
else if(obj.style.display=='inline-block' && obj.style.visibility!='visible')
{
obj.style.display='none';
}
}
faster and clearer (imho)
ericc
Bookmarks