Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modify pages before rendering

3 views
Skip to first unread message

Davide Capodaglio

unread,
Jun 16, 2009, 12:09:54 PM6/16/09
to
Hi all,
I have C++ applications with a HTML interface that use an embedded
WebBrowser control to display local pages.

I need to modify the page content BEFORE rendering and displaying it,
for internationalization and translation purpose.
To do this in my host application I'm sinking the DocumentComplete
event, and using the document->getElementsByTagName() method I get all
the tags to translate, altering their content with elem->innerHTML
(everything in the C++ side, so I do not need to add scripts to every
page).

But the effect is that the OLD page is displayed for a fraction of
second and THEN the new strings are shown.
I already tried also sinking DownloadComplete and
document.onreadystatechange, with no luck (the "redraw" effect is the
same).

How can I alter the page content before displaying it at all?
I know this is a recurrent problem but I have still not found any
answer, even on this forum.

Many thanks
Davide

0 new messages