Re: Problem with onClick on Menu Item in CRM 3.0 (and 4.0?) by Thomas
Thomas
Wed Jul 23 09:22:02 CDT 2008
I still need to set the value of the checkbox BEFORE
action=3D"onActionMenuClick('applyrule', 10001)" is fired...
I tried with mnuItem.addEventListener("click", modifyText, false);
without result... modifyText is not called...
How do I add som func BEFORE the action-code is called??
THANKS!
On 23 Jul., 16:11, Thomas <tdem...@gmail.com> wrote:
> mnuItem.style.display =3D 'none';
>
> Sorry, I'm getting tired...;-)
>
> On 23 Jul., 15:36, Thomas <tdem...@gmail.com> wrote:
>
> > Thank you for your time Dodd...
>
> > It does'nt work, propaply because the element allready has an action:
> > <TR action=3D"onActionMenuClick('applyrule', 10001)"
> > id=3D"_MIonActionMenuClickapplyrule10001">
>
> > I need to check a checkbox, and if checked, I need to disable the Menu
> > Item, so it cant be clicked.... I have tried changing innerHTML on the
> > element but without luck. I'm not able to overwrite it (the same with
> > innerText)
>
> > How do I disable or set visibility =3D 'hidden' to a Menu Item in
> > runtime?
>
> > On 23 Jul., 15:03, Dodd <MDod...@gmail.com> wrote:
>
> > > Try this:
>
> > > var applyRule =3D "_MIonActionMenuClickapplyrule10001";
> > > var mnuItem =3D document.getElementById(applyRule);
>
> > > // Click Interception Code
> > > if(mnuItem !=3D null)
> > > {
> > > =A0 =A0 document.all._MIonActionMenuClickapplyrule10001.onclick =3D
> > > function()
> > > =A0 =A0 {
> > > =A0 =A0 =A0 =A0 =A0//put your code here
> > > =A0 =A0 =A0 =A0 =A0alert("OnClick");
> > > =A0 =A0 =A0}
>
> > > }