Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How do I know the web page is ready after an ajax request?
Forum Updated to NodeBB v4.3 + New Features

How do I know the web page is ready after an ajax request?

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 393 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Network
    wrote on last edited by
    #1

    I have a page opened in my QWebView which update its contents via ajax. I want to grab those HTML elements when updated but I don't know at what time I should do that. Because from what I've seen, loadFinished() isn't called when an ajax request is done and the page's HTML contents gets modified. QWebReply's loadFinished() does get called when the ajax request is performed but calling findFirst() at this time (as I want to grab some HTML elements contents) doesn't find the elements. I guess it's because it's too soon, the page wasn't renderized yet or something.

    So, my question is: after an ajax update, how do I get HTML elements with findFirst() calling it soon as I see the url of the ajax's request in loadFinished() doesn't return the elements. If I put a button in my webForm and hit it after I see the ajax update is done I can grab the elements successfully, because findFirst() return the proper value.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved