Home > front end >  Bosses, emergency
Bosses, emergency

Time:04-17



Now I want to write a JS to complete an operation:
As shown in figure: click search first, after waiting for the data load, click the export button, export data,

Now is in a problem, click search, web page will response for a period of time, will show the data, this time to click export,

So I want to click on the search, whether a page to load or data loading is completed, the execution export,

Request how to judge whether a page to load or data to load? Without data haven't finished loading, begin to implement export,
 tosearch ();//call lookup button 

/*

Intermediate should be how to write??

*/
ExportExcelDataAll ();//call the export button

CodePudding user response:

Click on the query, the export button is disabled, when data request to come over, the export button to cancel the disabled

CodePudding user response:

You look after the data have been get to, and then the data can be directly deduced after binding to the page, your so-called click on the search page reaction after a period of time, this is what you get + data bound to the time of the page

CodePudding user response:

Time interval is the API response time, actually does not affect the page display data, export is API data returned by the operation, as long as the API response can click export,
Point to disable the export button when searching, the API response to click the export button can condition disabled attributes

CodePudding user response:

refer to the second floor bubble fish _ response:
to capturing the data has been after you look, and then the data can be directly deduced after binding to the page, your so-called click on the search page reaction after a period of time, this is what you get + data binding to page


Is such a truth, even though the first click search, and then click export, immediately can be derived data, but the page will have been waiting for the status of the (data has been show less than on the page), data export, I also want to other pages

CodePudding user response:

Qq_41037215
reference 4 floor response:
Quote: refer to the second floor bubble fish _ response:
you look after the data has been acquiring, then the data can be directly deduced after binding to the page, click your so-called search page reaction after a period of time, this is what you get + data binding to page


Is such a truth, even though the first click search, and then click export, immediately can be derived data, but the page will have been waiting for the status of the (data has been show less than on the page), data export, I also want to other page operation


Has said the above, the export button is not click state, directly after you get data and bound to the page, you will export the reset button is available...