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 6360043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:35:52+00:00 2026-05-24T23:35:52+00:00

I initially set out to learn how to handle ajax-ready file uploads; I found,

  • 0

I initially set out to learn how to handle “ajax-ready file uploads”; I found, and comprehend, one of the main concepts: it’s not possible as ajax, but you can submit a form with the target set to a hidden iFrame’s id [1]. That seems to be generally accepted by the community and compatible with all browsers. Is that an accurate assessment?

My question is: what are the pitfalls to this approach? Because if there are none, it seems to me that every “ajax-ready post” could be done in this same fashion. Remove the file upload component and this approach versus, say, a jQuery.post() approach appear to have identical outcomes.

In all the questions and resources I’ve researched, I’ve only been able to find “solutions” for handling my initial issue. I’ve been unable to find any sort of “pro v. con list” or “pitfalls to this approach” anywhere regarding a form targeting an iFrame; if you know of one, please feel free to share it!

[1] HTML Example:

<form method="post" target="take_the_reload">
    ...
</form>
<iframe class="hide_me" id="take_the_reload" name="take_the_reload"></iframe>

Much obliged,

Beez

References: Just a couple of the resources I’ve used:

  1. http://www.joshclarkson.net/blog/file-uploads-in-a-hidden-iframe-using-jquery/
  2. Firefox form targetting an iframe is opening new tab
  3. http://terminalapp.net/submitting-a-form-with-target-set-to-a-script-generated-iframe-on-ie/
  4. javascript: submit form in an iframe…help
  5. http://www.openjs.com/articles/ajax/ajax_file_upload/
  • 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-05-24T23:35:52+00:00Added an answer on May 24, 2026 at 11:35 pm

    When I first started AJAX (before jQuery and Prototype came along) I used to do exactly that with all my forms….just post them to a hidden Iframe. It was easy and painless.

    The drawbacks of form-post:

    • It’s not really “pure” AJAX (file uploads aside). I’m sure all the DOM manipulation in the iframe for the result is slower than just getting back a response via XHR.
    • The error handling is more difficult – you have to look at what the server puts in the Iframe as a result
    • Things are moving towards JSON-based data handling which forms alone don’t do
    • Sometimes you want to do something “in the middle” between the form and the server such as some field mapping or including other client-side data
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say for example I define several buttons in my XML file and initially set
I found out, that UITableView modify contentSize property and I can't set it by
I have this jQuery datepicker code that initially set the minDate of the datepicker.
I'm having a table and i have a row which is initially set to
location.hash seems to be utterly broken in Safari 4: It can be set initially,
I want to make a movieclip invisible initially but i dont want to set
I have 100 points to dole out to a set of items. Each item
I have an MDI application that initially doesn't have the main window open. When
I'm trying to figure it out how to set up an .htaccess set of
I am trying to set up TeamCity. Initially, I ran into various issues but

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.