Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9232483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:19:31+00:00 2026-06-18T06:19:31+00:00

i submit my form into an iframe via jquery. i got the result from

  • 0

i submit my form into an iframe via jquery. i got the result from the php file in JSON code. How can i use this string in my javascript?

form

<form target="iframe" method="post" action="upload.php" enctype="multipart/form-data">
...
</form>

response fromupload.php printed into the iframe

{"datafile":{"name":"","type":"","tmp_name":"","error":4,"size":0}}

whats the best way to register a callback if the response from the php arrived, and then access to the datafiles ‘s error property?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:19:32+00:00Added an answer on June 18, 2026 at 6:19 am

    Try to attach a load handler to the iframe. $('#iframe').on('load', handler) inside the handler you can get the iframe body and extract the json and parse it for use. You can do something like this in the handler

    var $body = $(this.contentDocument || this.contentWindow);
    if (!$body.is('body')){
        $body = $body.find('body');
    }
    var data = $.parseJSON($body.html());
    

    Note Same Origin Policy applies so this will not work if the post is made to another origin.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me why the following code fails to submit the form into
I got this code in my submit form <form id=myform action='hello.php' method='GET'> <input type=button
im using a form in php to submit some information into my database so
Is it possible to add the OR operator to php isset submit form code
I am using this tutorial to create a login form http://www.ryancoughlin.com/2008/11/04/use-jquery-to-submit-form/ It authenticates against
I am building an multiple file upload form that user can use to upload
My current aspx form askes users to input fields into texbox and press submit
In my iOS application I have made a form that should submit data into
Possible Duplicate: jQuery AJAX submit form I have a form on a page A,
I want to submit search term ( e.g what does foo means) into form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.