You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i need to copy the text returned from an AJAX request that fire when a button is clicked.
The problem is that inside the click event listener I call the function that perform the AJAX request but the returned data are processed inside a callback function (ajax success) that is no more inside the original click event listener, thus the copy fails.
The only walk around that make copy works is to make the ajax call synchronous (async: false jQuery option).
I'm wondering if there is another way to make copy works in my scenario that keep AJAX async (as it should be).
Thank you.
The text was updated successfully, but these errors were encountered:
I'm wondering if there is another way to make copy works in my scenario that keep AJAX async (as it should be).
At the moment, there is not. Browsers require specifying the data to be copied synchronously at copy time (and the copy action must be triggered in direct response to a user gesture). If you absolutely cannot have your data ready synchronously, I suggest having a button to generate the data, which then reveals an actual copy button when the data is ready.
Hi,
i need to copy the text returned from an AJAX request that fire when a button is clicked.
The problem is that inside the click event listener I call the function that perform the AJAX request but the returned data are processed inside a callback function (ajax success) that is no more inside the original click event listener, thus the copy fails.
The only walk around that make copy works is to make the ajax call synchronous (async: false jQuery option).
I'm wondering if there is another way to make copy works in my scenario that keep AJAX async (as it should be).
Thank you.
The text was updated successfully, but these errors were encountered: