s_avinash_s 0 Posted September 14, 2018 Report Share Posted September 14, 2018 Hi I need to get a data only once using xhttp.open("GET", "url",true); But i dont have any button, only when the server and client are running at first, only first it should get a data and later should not. Quote Link to post Share on other sites
dsonesuk 914 Posted September 14, 2018 Report Share Posted September 14, 2018 The client only runs on a event, with button it would be .onclick, a form .onsubmit, with none of these you are left with event .onload which it usually attached to window. that only runs when the document has fully rendered. https://www.w3schools.com/jsref/event_onload.asp 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.