4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 javascript onclick problem
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
lara_bc
Junior WebHelper
Junior WebHelper


Joined: 18 Mar 2004
Posts: 2

PostPosted: Thu Mar 18, 2004 7:21 pm (13 years, 9 months ago) Reply with QuoteBack to Top

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
OfflineView User's ProfileFind all posts by lara_bcSend Personal Message
lara_bc
Junior WebHelper
Junior WebHelper


Joined: 18 Mar 2004
Posts: 2

PostPosted: Thu Mar 18, 2004 9:35 pm (13 years, 9 months ago) Reply with QuoteBack to Top

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.
OfflineView User's ProfileFind all posts by lara_bcSend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.074486 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme