From: pistonep on
Hello,
I am trying to catch this event othe TR and TABLE tag. I have verified
that the event is fired in the HTML document by adding OnMouseOver to
the tag and it worked.
Now I want to catch it in my CDHTMLDialog class and...nothing happens :
(
My exemple is pretty simple :
The HTML file :
<HTML>
<BODY>
<TABLE>
<TR id="a">
<TD>
<BUTTON STYLE="WIDTH:100" >OK</BUTTON>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>

My C++ file
BEGIN_DHTML_EVENT_MAP(CtestSimpleHTMLDlg)
DHTML_EVENT_ONMOUSEOVER(_T("a"),OnMouseOverPortail)
END_DHTML_EVENT_MAP()

The event is catched with id placed on button and td tags but not on
tr and table
Could someone give me an explanation please and perhaps a way to
resolve my problem ?
Thanks

From: David Ching on

<pistonep(a)hotmail.com> wrote in message
news:1177082718.899437.109650(a)p77g2000hsh.googlegroups.com...
> Hello,
> I am trying to catch this event othe TR and TABLE tag. I have verified
> that the event is fired in the HTML document by adding OnMouseOver to
> the tag and it worked.
> Now I want to catch it in my CDHTMLDialog class and...nothing happens :
> (
> My exemple is pretty simple :
> The HTML file :
> <HTML>
> <BODY>
> <TABLE>
> <TR id="a">
> <TD>
> <BUTTON STYLE="WIDTH:100" >OK</BUTTON>
> </TD>
> </TR>
> </TABLE>
> </BODY>
> </HTML>
>
> My C++ file
> BEGIN_DHTML_EVENT_MAP(CtestSimpleHTMLDlg)
> DHTML_EVENT_ONMOUSEOVER(_T("a"),OnMouseOverPortail)
> END_DHTML_EVENT_MAP()
>
> The event is catched with id placed on button and td tags but not on
> tr and table
> Could someone give me an explanation please and perhaps a way to
> resolve my problem ?

Does the technique I described for your other post trap events for <TR>?

-- David


From: pistonep on
On 20 avr, 18:45, "David Ching" <d...(a)remove-this.dcsoft.com> wrote:
> <pisto...(a)hotmail.com> wrote in message
>
> news:1177082718.899437.109650(a)p77g2000hsh.googlegroups.com...
>
>
>
>
>
> > Hello,
> > I am trying to catch this event othe TR and TABLE tag. I have verified
> > that the event is fired in the HTML document by adding OnMouseOver to
> > the tag and it worked.
> > Now I want to catch it in my CDHTMLDialog class and...nothing happens :
> > (
> > My exemple is pretty simple :
> > The HTML file :
> > <HTML>
> > <BODY>
> > <TABLE>
> > <TR id="a">
> > <TD>
> > <BUTTON STYLE="WIDTH:100" >OK</BUTTON>
> > </TD>
> > </TR>
> > </TABLE>
> > </BODY>
> > </HTML>
>
> > My C++ file
> > BEGIN_DHTML_EVENT_MAP(CtestSimpleHTMLDlg)
> > DHTML_EVENT_ONMOUSEOVER(_T("a"),OnMouseOverPortail)
> > END_DHTML_EVENT_MAP()
>
> > The event is catched with id placed on button and td tags but not on
> > tr and table
> > Could someone give me an explanation please and perhaps a way to
> > resolve my problem ?
>
> Does the technique I described for your other post trap events for <TR>?
>
> -- David- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

No unlucky for me :( ..here is why i open another topic..if youcan
help me again ;)

From: David Ching on
<pistonep(a)hotmail.com> wrote in message
news:1177092221.319535.104060(a)q75g2000hsh.googlegroups.com...
> > I am trying to catch this event othe TR and TABLE tag. I have verified
> > that the event is fired in the HTML document by adding OnMouseOver to
> > the tag and it worked.
> > Now I want to catch it in my CDHTMLDialog class and...nothing happens :
> > (
> > My exemple is pretty simple :
> > The HTML file :
> > <HTML>
> > <BODY>
> > <TABLE>
> > <TR id="a">
> > <TD>
> > <BUTTON STYLE="WIDTH:100" >OK</BUTTON>
> > </TD>
> > </TR>
> > </TABLE>
> > </BODY>
> > </HTML>
>
> > My C++ file
> > BEGIN_DHTML_EVENT_MAP(CtestSimpleHTMLDlg)
> > DHTML_EVENT_ONMOUSEOVER(_T("a"),OnMouseOverPortail)
> > END_DHTML_EVENT_MAP()
>
> > The event is catched with id placed on button and td tags but not on
> > tr and table
> > Could someone give me an explanation please and perhaps a way to
> > resolve my problem ?
>
> Does the technique I described for your other post trap events for <TR>?
>
>No unlucky for me :( ..here is why i open another topic..if youcan
> help me again ;)

It seems it should work. Perhaps it's because the table row is completely
covered with <TD>, so the <TD> gets the mouse overs and not the row it's in.
You know what I'm saying?

Anyway, you could try using

DHTML_EVENT_TAG(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("tr"),
OnTableRowClicked)

and see if you get any OnTableRowClicked() calls.

-- David


From: pistonep on
On 20 avr, 20:56, "David Ching" <d...(a)remove-this.dcsoft.com> wrote:
> <pisto...(a)hotmail.com> wrote in message
>
> news:1177092221.319535.104060(a)q75g2000hsh.googlegroups.com...
>
>
>
>
>
> > > I am trying to catch this event othe TR and TABLE tag. I have verified
> > > that the event is fired in the HTML document by adding OnMouseOver to
> > > the tag and it worked.
> > > Now I want to catch it in my CDHTMLDialog class and...nothing happens :
> > > (
> > > My exemple is pretty simple :
> > > The HTML file :
> > > <HTML>
> > > <BODY>
> > > <TABLE>
> > > <TR id="a">
> > > <TD>
> > > <BUTTON STYLE="WIDTH:100" >OK</BUTTON>
> > > </TD>
> > > </TR>
> > > </TABLE>
> > > </BODY>
> > > </HTML>
>
> > > My C++ file
> > > BEGIN_DHTML_EVENT_MAP(CtestSimpleHTMLDlg)
> > > DHTML_EVENT_ONMOUSEOVER(_T("a"),OnMouseOverPortail)
> > > END_DHTML_EVENT_MAP()
>
> > > The event is catched with id placed on button and td tags but not on
> > > tr and table
> > > Could someone give me an explanation please and perhaps a way to
> > > resolve my problem ?
>
> > Does the technique I described for your other post trap events for <TR>?
>
> >No unlucky for me :( ..here is why i open another topic..if youcan
> > help me again ;)
>
> It seems it should work. Perhaps it's because the table row is completely
> covered with <TD>, so the <TD> gets the mouse overs and not the row it's in.
> You know what I'm saying?
>
> Anyway, you could try using
>
> DHTML_EVENT_TAG(DISPID_HTMLELEMENTEVENTS_ONCLICK, _T("tr"),
> OnTableRowClicked)
>
> and see if you get any OnTableRowClicked() calls.
>
> -- David- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

again thanks for your help.
The suggestion you make doesn t work in my so simple :( case. Perhaps
are you right about TD covering TR but what stuns me is that I can
found any reference on this problem on google ...
someone ?