 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eugene I. Mogilevsky Guest
|
Posted: Mon Nov 10, 2003 8:09 pm Post subject: One more Q about TWebBrowser: How can I catch content update |
|
|
Good Day.
Let me explain my problem:
I've got a page with frames. There's a JS function in a page which gets
(using perl script) some info (text) from server and adds this text to a
certain named element in a certain frame. Function do it every n seconds
(on timer). I know both interfaces to frame and to this updatable element.
I need do some actions in my program every time this element updates.
Which event should i catch? Onafterupdate for this element doesn't fit,
other events are not usable too.
Is there a way to make it using html elements events, or i should check
it manually using timer in my program and constantly scan this updatable
frame?
Thanks in advance
--
Best regards
Eugene
|
|
| Back to top |
|
 |
pascal chapuis Guest
|
Posted: Fri Nov 14, 2003 1:09 pm Post subject: Re: One more Q about TWebBrowser: How can I catch content up |
|
|
Hi Eugene,
The "downloadcomplete" event should occur at the right time but the url will
be the "decision key" for the action :
ie. if url='ThisParticularFrame' then ...
else ...
With sink, if you don't manage to get connected to the html element you
could implement
an IDispatch external object and call it through script (direct script call
or event fired)
when update notification is needed.
pascal
Eugene I. Mogilevsky <eim (AT) rambler (DOT) ru> a écrit dans le message :
[email]3fafef09 (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | Good Day.
Let me explain my problem:
I've got a page with frames. There's a JS function in a page which gets
(using perl script) some info (text) from server and adds this text to a
certain named element in a certain frame. Function do it every n seconds
(on timer). I know both interfaces to frame and to this updatable element.
I need do some actions in my program every time this element updates.
Which event should i catch? Onafterupdate for this element doesn't fit,
other events are not usable too.
Is there a way to make it using html elements events, or i should check
it manually using timer in my program and constantly scan this updatable
frame?
Thanks in advance
--
Best regards
Eugene
|
|
|
| Back to top |
|
 |
Eugene I. Mogilevsky Guest
|
Posted: Sat Nov 15, 2003 3:04 pm Post subject: Re: One more Q about TWebBrowser: How can I catch content up |
|
|
pascal chapuis wrote:
| Quote: | The "downloadcomplete" event should occur at the right time but the url will
be the "decision key" for the action :
ie. if url='ThisParticularFrame' then ...
else ...
|
I know, this is an another way (maybe the simplest way) to do it, but i
tried to avoid using this event. There should be more... elegant
solution, i thought ;)
| Quote: |
With sink, if you don't manage to get connected to the html element you
could implement
an IDispatch external object and call it through script (direct script call
or event fired)
when update notification is needed.
|
Sounds interesting... if i understand you correctly...
So there's a way to dynamically iherit call of my object into script?
For example, into JS function?
If so, it would be the best way to implement desired functionality, and
it would be nice to see an example for this ;)
--
Best regards
Eugene
|
|
| Back to top |
|
 |
pascal chapuis Guest
|
Posted: Tue Nov 25, 2003 6:42 pm Post subject: Re: One more Q about TWebBrowser: How can I catch content up |
|
|
Implementing an IDispath is done through TAutoIntfObject.
In your embedded webbrowser application, use "onGetExternal" event and
return your object.
In script use Window.external.<yourMethod....>
pascal
Eugene I. Mogilevsky <eim (AT) rambler (DOT) ru> a écrit dans le message :
[email]3fb63eed (AT) newsgroups (DOT) borland.com[/email]...
| Quote: | pascal chapuis wrote:
The "downloadcomplete" event should occur at the right time but the url
will
be the "decision key" for the action :
ie. if url='ThisParticularFrame' then ...
else ...
I know, this is an another way (maybe the simplest way) to do it, but i
tried to avoid using this event. There should be more... elegant
solution, i thought ;)
With sink, if you don't manage to get connected to the html element you
could implement
an IDispatch external object and call it through script (direct script
call
or event fired)
when update notification is needed.
Sounds interesting... if i understand you correctly...
So there's a way to dynamically iherit call of my object into script?
For example, into JS function?
If so, it would be the best way to implement desired functionality, and
it would be nice to see an example for this ;)
--
Best regards
Eugene
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|