Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] Get data from webpage upon clicks on links



  • Hi

    I have a webpage used as GUI. The contents of the page is filled with dynamic data from an SQL server by the php scripts in the webpage.

    When the user clicks a certain link I need to get the data "hidden" in the link (multiple strings) that the webpage gets from the SQL server upon the click and have this data in C to further use it.

    How can I achieve this?

    Thanks
    McL



  • AddOn:
    I found that I can read data from the webpage using JavaScript and QWebElement (formextractor sample).
    What I still miss is how to get the click and to get the correct data for the element clicked .... continuing to search.
    btw: I can influence the code on the webpage.



  • AddOn:
    Further test showed that I can declare and add arguments to function calls in JS:
    @
    C++:
    void FormExtractor::submit(QString strTest)

    html:
    form onsubmit="formExtractor.submit('Link-ID')"
    @
    So, for the moment, I have everything I need.


Log in to reply