0

I would like to keep this to the point and not stray into server request and that stuff. If it cant be done fine.

I have found that loading json/jsobject like a js script <script> file works but, i would like to try loading it dynamically upon request, sort of like a ajax request, without reloading the page.

My question, is. can i have have a hidden iframe load a page with the json files as script and pass the objects to the visible main page, if so, would i be able to make calls to refresh the iframe and get the new data, dynamically ?

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
Dewinky
  • 83
  • 6
  • 3
    *" sort of like a ajax request, without reloading the page."* - Why not use an *actual* ajax request? – GolezTrol Feb 12 '16 at 23:26
  • I mean, you *could* append a new script to the end of the body that pulls in the new data. But then you'd have to wait for that script to actually be interpreted as it won't be interpreted until the immediate script is done running. Really, this is better suited as an AJAX request. This sounds like a perfect candidate for it, actually. – Mike Cluck Feb 12 '16 at 23:28
  • *I would like to keep this to the point and not stray into server request and that stuff.* Are you actually using a server or are you expecting `file://` to work. Also, it is **terrible** practice to use `file://` because it has no use at production level and will only confuse you whenever you have to learn actual server stuff. – zero298 Feb 12 '16 at 23:57
  • Zero servers, the environment i am, will not allow a server request, so i am doing this with "file://" as i said no "server talk". at this point i am using " – Dewinky Feb 13 '16 at 08:45

0 Answers0