How to check if javascript element id exist?

  • if (ui->webView->page()->mainFrame()->evaluateJavaScript(QString("document.getElementById('ContentPlaceHolder1_ErrorTextLabel').value"))!=null)

    I want to make a function that does commands whenever the user makes an invalid log in. So I made a getElementById such that whenever the error text label exist, i can carry out other commands but qt is giving me the error ['null' was not declared in this scope]
    Is it a syntax or declaration error?
    Anyone can help me with this? Thanks!

Log in to reply

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