I had several problems with firefox, when I was designing online applications with lots of scripts. This time, I need to create a list of items that can be selected and “deleted”, just like in the classic Yahoo! Mail. I used a table row for each item. The table rows have [I]class=”m_normal”, onmouseover=”h(‘my-id’)” onmouseout=”h(‘my-id’)” onmousedown=”s(‘my-id’)”
[CODE]function s(obj){
if(eval(‘m’+obj).className==’m_hover’){
eval(‘m’+obj).className=’m_selected’;
} else {
if(eval(‘m’+obj).className==’m_selected’)
eval(‘m’+obj).className=’m_hover’;
}
}
function h(obj){
if(eval(‘m’+obj).className==’m_normal’){
eval(‘m’+obj).className=’m_hover’;
} else {
if(eval(‘m’+obj).className==’m_hover’)
eval(‘m’+obj).className=’m_normal’;
}
}
This has no effect under Firefox, while under IE works perfectly. I even tried to use setAttribute(“className”,”whatever”) and getAttribute(“className”,”whatever”). How can I make this script work in Firefox too? And because we were talking about Firefox, here is another question: why innerHTML and innerText doesn’t work correctly in Firefox?