javascript - Loading gif not working in IE & Chrome -


I have been searching and finding some similar questions about this problem but it still does not work for me Does. / P>

This is my function:

  function ajaxruz (url, type, datatype, content type, data, display img img) {var result = ""; DisplayLoadingImg = (type displayLoadingImg === "undefined")? 0: displayloading img; If (displayLoadingImg == 1) {$ ("# loadingImgAging") CSS ("display", "block"); } $ .jax ({url: url, type: type, data type: datatype, content type: content type, data: json.trive (data), success: function (race) {result = resident; if (displayLoadingImg == 1) {$ ("# LoadingImgAging"). CSS ("display", "none");}}, error: function (race) {result = "";}, async: false}); Return result; }   

How do I call it:

  setTimeout (ajxurist (url, "gET", "jason", "app / jason", 0 , 1), 500);   

I have tried to use () before ()> but it does not work either.

Note : If I delete async: false or put it on true , I'll get an error cross -Orision request blocked .... In my browser console

My guess is that you can not make an AJAX request with local files. There are ways to do this, but I like these two methods.

  • Create a simple server

    I usually create a simple server for Python Type it in your terminal / console: "Python -m SimpleHTTserver 9081" (or any port number you want). After that, open your local host in the context of your specified port.

    • OpenOff-In-All-File-Access-In-File Mode

      Or Create a Batch File Configuration Using the Following Code in Windows The first chrome must be restarted.

        Start "Chrome" "C: \ Program Files (x86) \ Google \ Chrome \ Application \ Chrome" - No File-Access-to-file exit    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -