How to detect & catch data from part of web contents change?



  • Dear friends,

    I made a converter for web view which get HTML code from via internet & convert some characters & set them into QWebView.

    But, there are some problems.
    Example: In "Facebook":http://www.facebook.com showing "Older Posts" doesn't change the whole Page.
    In Google Talk (web version built-in with Gmail), chatting with other accounts just change small content of page not the whole page.

    How can I detect the just part of contents changed & how to get such part of contents

    Thanks



  • Are you talking about AJAX requests? As I read, it's not so straightforward to detect that. But you could try hacking at it.. there is a method addToJavaScriptWindowObject(..) in QWebFrame which allows you to access some QObject in javascript. Maybe you can edit all JS on the page and add a call to the QObject passed in the above function to update. Or intercept the network request and network reply and use it somehow..

    Basically it's not possible or not so simple..



  • OK
    The thing what I want is like that
    "Firefox Addon":https://addons.mozilla.org/en-US/firefox/addon/myanmar-converter/versions/
    It has javascript funtion to covert non-Unicode Myanmar to unicode Myanmar.
    I try to load that javascript to webframe but fail.

    So, I make my own algorithm to covert like that in Qt browser.
    But, the main problem is as describe above. I successfully convert & use view->setHtml(ConvertedStr)
    but not work for such facebook & others web pages like that.

    Thanks



  • You might be able to use the "network access manager":http://doc.qt.nokia.com/4.7/qnetworkaccessmanager.html to change incoming data (not the emphasis is on might, I've never done it and I don't know if it is possible and I actually don't want to spend the time finding out)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.