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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:52:29+00:00 2026-05-23T00:52:29+00:00

I want to post some data to another domain with the enctype equal to

  • 0

I want to post some data to another domain with the enctype equal to multipart/form-data, because I want the unmodified data in the server side.
Here is my test code:

<textarea name="txt" rows="20" cols="80">
</textarea>
<script>
function x_domain_post(url, data)
{
    var dd = document.createElement('div');
    var ifrname = "client_proxy";
    dd.innerHTML = "<iframe id='" + ifrname + "' name='" + ifrname + "' width=0 height=0 ></iframe>";
    document.getElementsByTagName('body')[0].appendChild(dd);
    var ifr = document.getElementById(ifrname);

    var f = document.createElement('form');
    f.action = url;
    f.method = "post";
    f.enctype = "multipart/form-data";
    f.target = ifr.name;
    f.innerHTML = f.innerHTML + "<textarea name='request'>default</textarea>";
    document.getElementsByTagName("body")[0].appendChild(f);
    document.getElementsByName("request")[0].value=data;
    f.submit()
    setTimeout(function(){document.getElementsByTagName("body")[0].removeChild(f);}, 1000);
}

</script>
<button onclick="x_domain_post('http://192.168.232.128/add', document.getElementsByName('txt')[0].value)">

The request in chrome is:

...
Content-Type:multipart/form-data; boundary=----WebKitFormBoundary9zCD31eJSHkdb8ul
...
------WebKitFormBoundary9zCD31eJSHkdb8ul
Content-Disposition: form-data; name="request"

a

b

o
------WebKitFormBoundary9zCD31eJSHkdb8ul--

But in IE9:

POST /add HTTP/1.1
...
Content-Type: application/x-www-form-urlencoded
...
request=a%0D%0A%0D%0Ab%0D%0A%0D%0Ao

Any of your help will be appreciated!

  • 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-23T00:52:30+00:00Added an answer on May 23, 2026 at 12:52 am

    Does this help?

    http://www.bennadel.com/blog/1273-Setting-Form-EncType-Dynamically-To-Multipart-Form-Data-In-IE-Internet-Explorer-.htm

    Apparently in IE, you have to set the
    “encoding” of the form rather than the
    “enctype”. The good news is, you can
    set both values without concern and
    this will take care of the problem

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

Sidebar

Related Questions

I want to post some data via javascript to another domain. Something like: http://www.othersite.com/submitfunnyname?name=blah
I want to post some values from a simple HTML form, validate them with
Got some solved troubles, but want to ask, maybe here is another solution. Here
I want to redirect a response to another URL while it contains some POST
I have a Rails app that will post some data to another Rails app.
I want to send some strings in a list in a POST call. eg:
I want to filter some reserved word on my title form. $adtitle = sanitize($_POST['title']);
I want to make a form like this, and i want to post the
I have an ASP.NET application in which i want to post data using jQuery
I have a page from a 3rdparty I want to post to another page

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.