s_avinash_s Posted September 14, 2018 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. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 14, 2018 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now