ie div onclick problem

X

xdevel1999

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
 
X

xdevel1999

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 renderedarea 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,815
Messages
2,569,702
Members
45,492
Latest member
juliuscaesar

Latest Threads

Top