Avatar of carsRST
Flag for United States of America

asked on 

JSON - Iframe

I have an upload page that returns JSON.  For AJAX purposes, I'm using an Iframe.  I'm trying to capture the data as shown below, but not having luck.  Hoping someone could shed some light.

    var result = JSON.parse($('body', this.contentWindow.document).html());    
    if(result.success == 1) { ...}

Only thing that happens is the JSON data is returned and downloaded as a file.

Here's the JSON data returned:
{"success":1,"file_name":"3rd Grade Times-v1.xlsx","file_div":"cube_accepted_date"}

Avatar of undefined
Last Comment

8/22/2022 - Mon