| Author |
Message |
dligon
Joined: 19 Sep 2007 Posts: 1 Location: USA
|
Posted: Wed Sep 19, 2007 7:21 pm Post subject: onClick support in 2.9.4? |
|
|
Our site currently uses Coolmenupro Version 2.4.8, and we would like to upgrade to version 2.9.4 for IE7 compatibility, but cannot seem to get the onClick event to work in the new version.
Using the sample code provided in COOLjsMenu Professional\2.9.4\Samples\Commented\Popup menus\sample.php.html, we tried to change the following event from onmouseover to onClick and it does not work:
CHANGED FROM:
<p><a href="sample.php.html#" onmouseover="CMenuPopUp('test', event)">Popup in mouse position</a></p>
CHANGED TO:
<p><a href="sample.php.html#" onClick="CMenuPopUp('test', event)">Popup in mouse position</a></p>
Can you tell us whether the onClick event is still supported? |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Thu Sep 27, 2007 11:52 am Post subject: |
|
|
You should cancel event bubbling in your onclick event handler:
| Code: | if (event.stopPropagation) {
event.stopPropagation();
} else {
event.cancelBubbling = true;
} |
|
|
| Back to top |
|
 |
PRDG1
Joined: 22 Jan 2008 Posts: 1 Location: Dallas, TX
|
Posted: Tue Jan 22, 2008 3:45 pm Post subject: Along the same lines... |
|
|
Forgive me because javascript is not my strong suite. I've used one of the graphical pro menus for a project that I'm working on. A developer emailed me and said that he's trying to "call one javascript method onclick" within one of the menu dropdowns. Is what this user experienced the same issue he is referencing? What needs to be done? Here is the sample code snippet he sent me...
{code:"Quick LT", size:[20,75]}, this is the place he needs to insert a CallLineTestFunction{}
I'm assuming the reason he can't get it to work is because of the onClick issue. |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Wed Mar 05, 2008 9:52 am Post subject: |
|
|
No, these issues are unrelated. Here is a simple answer to your message:
| Code: | | {code:"Quick LT", size:[20,75], url:'javascript:CallLineTestFunction{}'}, |
More sophisticated approach is also possible. |
|
| Back to top |
|
 |
|