From: pistonep on
Hello,
I use a DHTML dialog with dynamicallly constructed controls.
I want to catch OnClick events on these controls but of course I don t
know what will be their ids.
ON_EVENT_RANGE is not working with BEGIN_DHTML_EVENT_MAP and I would
not like to call a specific C++ function on my dialog box from the
javascript code but catch the event.
Perhaps someone has a solution for my problem ?

Thanks you.

Patrice

From: David Ching on

<pistonep(a)hotmail.com> wrote in message
news:1176995536.523237.262520(a)p77g2000hsh.googlegroups.com...
> Hello,
> I use a DHTML dialog with dynamicallly constructed controls.
> I want to catch OnClick events on these controls but of course I don t
> know what will be their ids.
> ON_EVENT_RANGE is not working with BEGIN_DHTML_EVENT_MAP and I would
> not like to call a specific C++ function on my dialog box from the
> javascript code but catch the event.
> Perhaps someone has a solution for my problem ?
>

My map has something like
DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)

where "link_requirements" is the "id" of the tag. I would imagine your
dynamically constructed HTML has id's in them, don't they?

-- David

From: pistonep on
On 19 avr, 23:36, "David Ching" <d...(a)remove-this.dcsoft.com> wrote:
> <pisto...(a)hotmail.com> wrote in message
>
> news:1176995536.523237.262520(a)p77g2000hsh.googlegroups.com...
>
> > Hello,
> > I use a DHTML dialog with dynamicallly constructed controls.
> > I want to catch OnClick events on these controls but of course I don t
> > know what will be their ids.
> > ON_EVENT_RANGE is not working with BEGIN_DHTML_EVENT_MAP and I would
> > not like to call a specific C++ function on my dialog box from the
> > javascript code but catch the event.
> > Perhaps someone has a solution for my problem ?
>
> My map has something like
> DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
>
> where "link_requirements" is the "id" of the tag. I would imagine your
> dynamically constructed HTML has id's in them, don't they?
>
> -- David

Yes but I don't know the name of the id when i wrote
DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
Typically client are sending HTML file to my application and I have to
send them back the id onclick events

From: David Ching on
<pistonep(a)hotmail.com> wrote in message
news:1177059419.079739.86700(a)e65g2000hsc.googlegroups.com...
>> My map has something like
>> DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
>>
>> where "link_requirements" is the "id" of the tag. I would imagine your
>> dynamically constructed HTML has id's in them, don't they?
>>
>
> Yes but I don't know the name of the id when i wrote
> DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
> Typically client are sending HTML file to my application and I have to
> send them back the id onclick events
>

Yes, I have the same problem, needing to sync the id with the provider of
the HTML. But it does work, one the id's sync. Could you explain your
problem in more detail? I still don't understand why sinking events from
the HTML is a problem.

Thanks,
David


From: pistonep on
On 20 avr, 15:57, "David Ching" <d...(a)remove-this.dcsoft.com> wrote:
> <pisto...(a)hotmail.com> wrote in message
>
> news:1177059419.079739.86700(a)e65g2000hsc.googlegroups.com...
>
> >> My map has something like
> >> DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
>
> >> where "link_requirements" is the "id" of the tag. I would imagine your
> >> dynamically constructed HTML has id's in them, don't they?
>
> > Yes but I don't know the name of the id when i wrote
> > DHTML_EVENT_ONCLICK(_T("link_requirements"), OnRequirements)
> > Typically client are sending HTML file to my application and I have to
> > send them back the id onclick events
>
> Yes, I have the same problem, needing to sync the id with the provider of
> the HTML. But it does work, one the id's sync. Could you explain your
> problem in more detail? I still don't understand why sinking events from
> the HTML is a problem.
>
> Thanks,
> David

Thanks to you David.
Well to resume I have an HTML :
<script>
function addRow(id)
{
//add a row to the main table with the id provided
}
<script>
<body>
<table>
</table>
</body>

I have my C++ CDHTMLDialog attached to this html file, so when i start
the program i have a blank page.
My main c++ program has a fucntion call
void AddHTMLRow(CString sString)
{
//call addRow function of the jcript passing a id got in the CString
}

and now I could not catch event if this specific row because I have
not set DHTML_EVENT_ONCLICK with the right (unknown at te begining) id