EvaluateJavaScript doesn’t work in BlackBerry 10 - QML



  • Hello all,

    I have a code for using evaluateJavaScript in BlackBerry 10 but doesn’t work:

    @Webview{
    id: myweb
    html: '<!DOCTYPE html>
    <html>
    <body>
    <p id="hi">Hello World!</p>
    </body>
    </html>'
    onLoadingChanged: {
    if (loadRequest.status == WebLoadStatus.Succeeded) {
    var sendtext = myweb.evaluateJavaScript('document.getElementById("hi")');
    mytext.text = sendtext.tostring();
    }
    }

    Textarea{
    id: mytext
    text: "";
    }@

    Then show in textare like this " -1 ".

    What is the problem?

    Thanks!



  • Wait help (:


Log in to reply
 

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