6.0.0-beta1
7/8/25

[#10121] DIMP view ignores onclick handler from menu.php
Summary DIMP view ignores onclick handler from menu.php
Queue IMP
Queue Version 5.0.3
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester ralf.lang (at) ralf-lang (dot) de
Created 05/25/2011 (5158 days ago)
Due
Updated 05/25/2011 (5158 days ago)
Assigned
Resolved 05/25/2011 (5158 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/25/2011 04:00:26 PM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
Not sure where you are looking, but it is clearly noted in 
imp/config/menu.php:

  *  'onclick'    Javascript to execute on the "onclick" event 
(standard view only).
05/25/2011 12:34:09 PM Ralf Lang Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ DIMP view ignores onclick handler from menu.php
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
Reply to this comment
In menu.php the description says

  * These attributes are optional:
  *
  *  'icon'      The filename of an icon to use for the menu item.
  *  'icon_path' The path to the icon if it doesn't exist in the graphics/
  *              directory.
  *  'target'    The "target" of the link (e.g. '_top', '_blank').
  *  'onclick'   Any JavaScript to execute on the "onclick" event.

It is not clear from the description that this doesn't work in ajax 
mode / DIMP.

Example:

$_menu[] = array('url' => 'http://www.google.de',
                'text' => 'Google Link',
                'onclick' => "alert('You have clicked Google!')",

Works as desired in traditional mode, but in ajax mode, no popup is displayed.

Is this intended (and just not documented) or is it a bug?

Saved Queries