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

  • Home
  • SEARCH
  • 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 8327795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:13:56+00:00 2026-06-09T01:13:56+00:00

I am using a Form in a LightBox which contains some input element. <form

  • 0

I am using a Form in a LightBox which contains some input element.

<form name="imageUploadForm" action="uploadImage.do" method="post" enctype="multipart/form-data">
<input type="text"  id="id" name="id" style="display: none;" value="">
    <div id="fileUploaderDiv">
         <input type='file' name="file0" id ="file0"  />
    </div>
<input type="submit" value="Submit">
</form>

when i am submitting the form than the form redirect to it’s action location. I just want to submit form without redirecting user, so user stay on lightbox without loosing his data.

I have tried jquery ajax call for this

var data = new FormData();
var $inputs = $('#imageUploadForm :input');
var values = {};
    $inputs.each(function() {
                values[this.name] = $(this).val();
                data.append(this.name, $(this).val());
            });
$.ajax({
                url: 'uploadImage.do',
                data: data,
                cache: false,
                contentType: 'multipart/form-data',
                processData: false,
                type: 'POST',
                success: function(data){
                   alert(data);
                }
            });

But getting error at server side in my FileUploader servlet.

The request was rejected because no multipart boundary was found 

can anybody tell me what am i missing in this ?

  • 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-09T01:13:59+00:00Added an answer on June 9, 2026 at 1:13 am

    Here is the simplest form of a form submit using jquery Ajax. I have not tested this but it should work 🙂

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Test form</title>
        <script src="http://code.jquery.com/jquery-latest.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
            $('#sbmt').click(function(){
                var text1 = $('#text1').val();
                var text2 = $('#text2').val();
                /// validation of inputs
                ///then
                $.ajax(
                {
                    url :'submit.php',
                    type : 'post',
                            data :  {'text1' : text1, 'text2' : text2 },
                    success: function(data){
                            alert("form submitted . response is :"+ data);
                        }
                }
                ).fail(function(){alert("Failed!!");});
                });
            });
        </script>
    </head>
    <body>
        <form id="myform">
            <input type="text" id="text1" />
            <input type="text" id="text2" />
            <input type="button" id="sbmt"  value="submit"/>
        </form>
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using a Form in a LightBox which contains some input element. <form
I send form data using php in colorbox(lightbox) ifarme method. so i close auto
I am using form_tag <%= form_tag url_for(:action=>'url'), :onclick=> $('.submit_btn').addClass('disabled');, :complete=>$(.submit_btn).removeClass(disabled), :method=>post, :remote =>true do
I have a form made using Webform[Drupal] which I load on the lightbox. The
Using colorbox.js, I am opening a form in a lightbox when the user clicks
i am using form authentication for my website which is written in ASP.Net, but
Code to create new form instance of a closed form using form name I
Ordinarily, using form_for(@foo) means that on the back end of the form's action, you'll
I am trying to put in a log-in form via a lightbox using inline
i'm using form with enctype multipart/form-data for uploading photo, so below is my code

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.