Home > Back-end >  Execute the query in the webbrowser, how to judge the query execution is completed
Execute the query in the webbrowser, how to judge the query execution is completed

Time:10-05

Automatically by the webbrowser made a query, after click the query button to execute the query, query after the completion of analysis results, the question now is, when click the query button to execute queries, because it takes time to return the query results, but the program did not wait for the return value is executed directly, next to the query result analysis error, could you tell me how to determine whether the query is complete,
Although DocumentComplete to determine whether a web page to load, but he's not executed after the start of the query,
Procedure TForm1. Button1Click (Sender: TObject);
The begin
//framework for web assignment
Webbrowser1. OleObject. Document. Frames. The item (2). The document. All the item (' name '). The value:='* *';
//click the query button
Webbrowser1. OleObject. Document. Frames. The item (2) the document. All the item (" query "). Click;
//query results, but there is no return results due to the previous step begins to execute the following code, lead to the result error,
.
end;
  • Related