Re: IE6 onlick not firing



"Will Holley" <WillHolley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A0A69E91-0735-49EC-8F27-5D89210473EA@xxxxxxxxxxxxxxxx
> We have a number of anchor tags in our web app which look like:
>
> <a href='javascript:void(0)' class = 'btnExpand' onclick = 'return
> showDetails()'>+</a>
>
> The onclick event appears to function correctly and has done for many
> months. We recently bought a bunch of new development machines and for
some
> developers, the onclick event does not fire.
>
> However, if we change the code to be:
>
> cell.innerHTML = "<a href='javascript:void(0)' class='btnExpand'>+</a>";
> cell.firstChild.onclick = showDetails;
>
> then all is ok again!
>
> A bit of info:
>
> 1. Our app is targeted at IE6+.
> 2. Changing all events in the app is not an option.
> 3. On one machine the original code works for some users and not for
others
> (active dir 2003 profiles - all admins and supposedly identical).
> 4. Conversely, the behaviour follows the user profile around on whatever
> machine they happen to use.
> 5. In a test page in the same app inline onclick events always work for
all
> users.
>
> We are completely stumped so if anybody has any ideas as to what may cause
> this behaviour I would greatly appreciate it.
>
> Kind regards,
>
> Will Holley
>
> p.s. apols for the cross post - had to post again for managed support

<a> does not have an "onclick" event.

Try
<span class = 'btnExpand' onclick = 'return showDetails()'>+</span>

Or maybe
<a href='return showDetails()' class = 'btnExpand'>+</a>
or
<a href='showDetails()' class = 'btnExpand'>+</a>


.



Relevant Pages

  • IE6 onlick not firing
    ... The onclick event appears to function correctly and has done for many ... Our app is targeted at IE6+. ... the behaviour follows the user profile around on whatever ... p.s. apols for the cross post - had to post again for managed support ...
    (microsoft.public.scripting.jscript)
  • Re: IE6 onlick not firing
    ... the onclick event does not fire. ... Our app is targeted at IE6+. ... On one machine the original code works for some users and not for ... without even the implied warranty of merchantability ...
    (microsoft.public.scripting.jscript)
  • Re: IE6 onlick not firing
    ... > We have a number of anchor tags in our web app which look like: ... Since void evaluates an expression ... Our app is targeted at IE6+. ... the onclick event does not fire." ...
    (microsoft.public.scripting.jscript)
  • Re: Captions and Labels
    ... Any chance of some ... >Create a simple app with 1 button on the main form. ... >Use the example I gave in the earlier post and paste it in the OnClick event ... >timer event. ...
    (alt.comp.lang.borland-delphi)
  • Re: IE6 onlick not firing
    ... The onclick event appears to function correctly and has done for many ... On one machine the original code works for some users and not for ... the behaviour follows the user profile around on whatever ... p.s. apols for the cross post - had to post again for managed support ...
    (microsoft.public.scripting.jscript)