Hi why if I have a DIV I can raise an onclick event only on the inner
DIVs and not
on the whole area? (Firefox does it)
<div id="submenu" class="style1">
<div id="item" onclick="alert(444)">
<div id="a">
AAAAAAAAAa</div>
<div id="B">
bbbbbbbbbb</div>
</div>
</div>
Here the div is height 100px:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! AAAAA |
! bbbbbb |
! . if I click in this empty but rendered area here
the event is not raised!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Any idea?
Thanks
|
|
0
|
|
|
|
Reply
|
xdevel1999 (81)
|
10/30/2008 11:29:59 AM |
|
On 30 Ott, 12:29, xdevel1999 <xdevel1...@gmail.com> wrote:
> Hi why if I have a DIV I can raise an onclick event only on the inner
> DIVs and not
> on the whole area? (Firefox does it)
>
> =A0 =A0<div id=3D"submenu" class=3D"style1">
> =A0 =A0 =A0 =A0 <div id=3D"item" onclick=3D"alert(444)">
> =A0 =A0 =A0 =A0 =A0 =A0 <div id=3D"a">
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 AAAAAAAAAa</div>
> =A0 =A0 =A0 =A0 =A0 =A0 <div id=3D"B">
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bbbbbbbbbb</div>
> =A0 =A0 =A0 =A0 </div>
> =A0 =A0 </div>
>
> Here the div is height 100px:
>
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
> ! =A0AAAAA =A0 =A0 =A0 =A0 =A0 =A0 =A0|
> ! =A0bbbbbb =A0 =A0 =A0 =A0 =A0 =A0 =A0 |
> ! =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 . if I click in this empty but rendered=
area here
> the event is not raised!
> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>
> Any idea?
>
> Thanks
ok a friend of mine give me the answer and I post it so it can be
useful for someone else:
in ie we need to set a background-color so all the area will be
rendered well for
the event
Bye
|
|
0
|
|
|
|
Reply
|
xdevel1999
|
10/30/2008 6:49:18 PM
|
|