![]() ![]() But for this question we don't care about these specifics. The specification is quite general and has to deal with a lot of details conserning encoding, CORS,Īnd so on. Section in the official html5 specification describes how these things are supposed to work. ![]() Will that json_callback function always have precedence before the onload handler? So far it works perfectly in JS fiddle and my offline site but I wonder if this is an expected behavior? Will thatįunction always have precedence before the ![]() Variable so that the handler function is only called once. I have noticed that callback function is triggered before the Now the problem is, if all loaded normally and data was returned, it will fire both, My callback function will not be called for those invalid requests, so I added an However, if you only make changes to the url of the script, it can still connects to the server and fires anĮvent instead. ![]() This on error event actually fires if you change host name or domain of the script to something non-existent. many things that can go wrong with the script, so I naturally added anĮvent. success: callback function is called and it has a proper dataĮlse alert ('error') //something went wrongĪs you can see. setting initial state so that function will only work once ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |