-
Context Menu II and Javascript Functions onClick
Context Menu II
http://www.dynamicdrive.com/dynamici...ntextmenu2.htm
Doesn't seem to want to execute functions onClick. Can anyone tell me why this won't work?
<TR><TD STYLE="border:1pt solid #F9F8F7" ID="i1" ONMOUSEOVER="document.all.i1.style.background=\'#B6BDD2\';document.all.i1.style.border=\'1pt solid #737B92\';" ONMOUSEOUT="document.all.i1.style.background=\'#F9F8F7\';document.all.i1.style.border=\'1pt solid #F9F8F7\';" ONCLICK="displayIt(\'newFolder\');"> <IMG SRC="/snapblast/images/icons/icn_foldernew.gif" WIDTH="12" HEIGHT="11" BORDER="0" HSPACE="0" VSPACE="0" ALIGN="absmiddle"> New Folder</TD></TR>
Last edited by KoldFuzun; 07-20-2005 at 06:01 AM.
-
-
Just for reference, here is the function, which i use a LOT and works well. All it does is toggle the visibility of a div
var state = 'hidden';
function displayIt(layer_ref) {
if (state == 'visible') {
state = 'hidden';
} else {
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}
Last edited by KoldFuzun; 07-19-2005 at 09:26 PM.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks