[imp] onclick - JavaScript at menu.php

Jan Schneider jan at horde.org
Thu Nov 27 02:15:55 PST 2003


Zitat von mfred <impquest at tplus.at>:

> Hi,
>
> I want to define a new Button in Imp
>
> this is what I have done (but not working as wanted):
>
> $_menu[] = array(
> 'url' => '',
> 'text' => 'test',
> 'icon' => 'important.gif',
> 'icon_path' => '/horde/imp/graphics/',
> 'target' => '_blank',
> 'onclick' =>
>
'window.open('targeturl','_blank','width=550,height=430,left=300,top=100')'

             ^         ^ ^      ^ ^                                     ^
You have to escape those quotes, like: 'window.open(\'targeturl\', ...

> );
>
> As the html code works
> <a href=""
>
onClick="window.open('targeturl','_blank','width=550,height=430,left=300,top
> =100')">test</a>
>
> I can't see why I get a parse error in Imp.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the imp mailing list