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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:58:03+00:00 2026-06-11T04:58:03+00:00

I have an iframe which will have an input tag that allows you to

  • 0

I have an iframe which will have an input tag that allows you to browse for the file you are wanting to upload.

What i was then doing was creating a new input type = “file” tag in my hidden form data which would be populated with the src of the file.

At the end of everything there is a button the users can use to submit the actual form.

The submitted form, will have the file, but it would be empty. I was thinking there might be some underlying event going on that i didnt know about. When reading up on it, i also had noticed that if the source is wrong, it will just send an empty file.

How is this done correct?

Update: When looking at the data,the dom element input:file has an attribute called files which is the attribute i want to move to the new item. My fiddle is: http://jsfiddle.net/4vNXv/

I cant seem to get new data to move over from the old input to the new input.

Edit: I was thinking that jQuery might be able to maintain data by copying the whole object. via the $(this).clone() command, but that was not working either.

  • 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-11T04:58:05+00:00Added an answer on June 11, 2026 at 4:58 am

    The key question mentioned here is the Title which says MOVE. Moving data around by moving the entire element should not have issues of security risk occurances. The reasoning behind this is that nothing is being created or modified. The input is remaining intact, but it just moved from 1 area to another.

    To accomplish this workaround, you should do the following:

    1.  clone the object.  This will leave a placeholder there, so it doesnt look like anything moved.
    2.  use appendTo to append it to the new form.  
    

    Sample below I had used:

    $item = $(this);
    $clone = $(this).clone();
    $item.after($clone).appendTo("#newForm");
    

    This work around created the new object, but because it is not thing thing being moved or changed, you will not need to worry about the contents being shuffled around for a security risk. The original is selected and moved from its current location to its new location, in #newForm.

    Source information: copying the value of a form's file input field to another form's input field

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

Sidebar

Related Questions

I have an iframe which lets say that it contains the following text: <h1>
I have an embedded iframe form which takes a file from a type=file form
I have a page which has an Iframe. In that Iframe, there are six
I have an editor which is in my window that contains a wrapping iframe
So I have the following code which is doing a setInterval until the iframe
We have a form with five <input type=file/> elements that is in production and
In a page, I have a single iframe in which I will load various
On my page, I have an iframe tag that I control. The iframe src
I have a program which will dynamically set an iframe src to load pages.
I have a class which enables forms with a file-type input to be submitted

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.