troubleshooting Question

JSON - Iframe

Avatar of carsRST
carsRSTFlag for United States of America asked on
JavaScriptHTMLPHP
5 Comments1 Solution729 ViewsLast Modified:
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"}
ASKER CERTIFIED SOLUTION
leakim971
Multitechnician
Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros