I am making a small text editor for text areas on my website.
Just to handle simple text formatting etc...
I have an emoticon button which I want to display a <div> of all the emoticons below the actual emoticon button.
I have the javascript code to find the left and top positions of the emoticon button, which spits out numbers that look correct.
However in my show_emoticons function the left and top style setting is never getting set, in firebug they are just displayed as ""
function show_emoticons(id)
{
var el = document.getElementById(id + '_emoticons_list');
if(el.style.display == "none")
{
el.style.display = "block";
var parent = document.getElementById(id + '_emoticons');
el.style.left = findPosX(parent);
el.style.top = findPosY(parent) + parent.style.height;
}
else
{
el.style.display = "none";
}
}
I'm probably doing something stupid but I just cannot figure this out.
findPosX and findPosY both give out valid numbers when using firebug to find the problem.
Any help on this would be much appreciated.
Thanks!

New Topic/Question
Reply


MultiQuote





|