|
Author |
Message |
lara_bc
Junior WebHelper
Joined: 18 Mar 2004
Posts: 2
|
Posted:
Thu Mar 18, 2004 7:21 pm (20 years, 1 month ago) |
|
Hi Guys,
I have the following code to display a menu on mouse over.
Code: | <span class="stencilHead" onMouseOver="showMenu('Stencil-Menu');">
<img src="../english/images/button_menuSmall.gif" width="34" height="11" border="0" alt="" style="position:relative;top:1px;">
</span>
<div id="Stencil-Menu" class="hovermenu">
<div class=hovercontent><a class=navleftsm href="javascript:perform('clearstencil', '-1');">Clear Stencil</a><br><br class=size1></div>
</div> |
When i try the same for onClick (replacing onMouseOver with onClick), it is not working.
In the javascript i have the following code.
Code: | if (isIE){
document.attachEvent('onclick',mouseClickHandler);
}
function mouseClickHandler(e) {
var clickedNode = getTarget(e);
if (!clickedNode) return;
if (isPlusMinus(clickedNode) )
{
if (isCollapsed(clickedNode))
expand(clickedNode);
else if (isExpanded(clickedNode))
collapse(clickedNode);
}
else
{
var plus_minus = getPlusMinus(clickedNode);
if (plus_minus != null)
highlightTopic(plus_minus);
}
} |
If i put an alert() in the mouseClickHandler() function it is working along with displaying the alert statement, but if i remove the alert it is not working.
Can someone tell me what's going wrong in my code and what's needed to be done to make it work?
Thanks you.
Lara
Mod Edit: added code tags |
|
|
|
|
lara_bc
Junior WebHelper
Joined: 18 Mar 2004
Posts: 2
|
Posted:
Thu Mar 18, 2004 9:35 pm (20 years, 1 month ago) |
|
Hi Guys,
Sorry for the earlier post on problem with onClick. Turned out , it is a problem with another javascript and not with onClick section. Thanks and sorry once again about it. |
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.120259 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |