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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:14:40+00:00 2026-06-04T05:14:40+00:00

Using the following HTML input and Javascript, a user can add up to 3

  • 0

Using the following HTML input and Javascript, a user can add up to 3 files to a page.

Code for the file upload input:

    <input id="my_file_element" type="file" name="file_1" >
    <input type="submit">
Files:
<div id="files_list"></div>
<script> 
    var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 3 );
    multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>

JavaScript in the HTML Header:

<script language="javascript"> 

    function MultiSelector( list_target, max ){

    this.list_target = list_target;

    this.count = 0;

    this.id = 0;

    if( max ){
        this.max = max;
    } else {
        this.max = -1;
    };

    this.addElement = function( element ){


        if( element.tagName == 'INPUT' && element.type == 'file' ){

            element.name = 'file_' + this.id++;


            element.multi_selector = this;

            element.onchange = function(){

                var new_element = document.createElement( 'input' );
                new_element.type = 'file';

                this.parentNode.insertBefore( new_element, this );

                this.multi_selector.addElement( new_element );

                this.multi_selector.addListRow( this );

                this.style.position = 'absolute';
                this.style.left = '-1000px';

            };

            if( this.max != -1 && this.count >= this.max ){
                element.disabled = true;
            };

            this.count++;

            this.current_element = element;

        } else {
            alert( 'Error: not a file input element' );
        };

    };

    this.addListRow = function( element ){


        var new_row = document.createElement( 'div' );


        var new_row_button = document.createElement( 'input' );
        new_row_button.type = 'button';
        new_row_button.value = 'Delete';

        new_row.element = element;


        new_row_button.onclick= function(){

            this.parentNode.element.parentNode.removeChild( this.parentNode.element );

            this.parentNode.parentNode.removeChild( this.parentNode );


            this.parentNode.element.multi_selector.count--;

            this.parentNode.element.multi_selector.current_element.disabled = false;

            return false;
        };

        new_row.innerHTML = element.value;

        new_row.appendChild( new_row_button );

        this.list_target.appendChild( new_row );

    };

};
    </script>

How do I get the blob files (up to 3) inserted into Oracle DB using Pl/SQL?

  • 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-04T05:14:42+00:00Added an answer on June 4, 2026 at 5:14 am

    What a can of worms. I’ve looked around a bit, and all i can tell you is that what you want to do is not easy at all. There are several problems you’ll have to work around. But, if you are interested, a brave person made a plugin available with multi-file upload (at a price).

    The main issue is that Apex has no way of handling file uploads through AJAX. From the documentation of the plugin you can glean some info: files are processed in chunks, to be reconstructed at the end. In IE (and non-html5 browsers (and IE9 also has no FileReader object)) the files are processed one by one through a seperate page and through an iframe. Presumably, this page has a file browse item. I believe files will also be uploaded right away.

    Another way would perhaps be through apex listener. Although here you’ll have to figure out even more to get this to work.

    However, when you say ‘upload files (up to 3)’, does this mean that you can only upload up to 3 files max? In that case, why don’t you create 3 file browse items, which you then dynamically show/hide? Save yourself the trouble of trying to mimic the multi-file plugin.

    If you do want, the best route would perhaps be the use of an extra page, especially when using IE.

    In HTML5 browsers you could try the FileReader object in javascript, read the file and encode it, then process it in chunks and put it back together serverside through plsql. For more info on that, check Reading local files in javascript and Html5 File Upload with Progress.

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

Sidebar

Related Questions

I am using following code to display HTML Form on my web page. This
I am using the following html <input type=button value=Get onClick=get();> get(); it is some
I open a pop-up window using following code in main.html function openwindow(url) { window.open(url,
Okay, so i have the following html added to a site using javascript/greasemonkey. (just
I am using the following code to fetch html source website. private string Extract_Source(string
I am using the following to parse an html page and return the images:
I have the following HTML: <input type=text id=endDateEditBox value= style=margin-left:5px; height:18px; width:70px; vertical-align:middle; onchange=validateDate('endDateEditBox',
Given the following HTML fragment: <div class=word> <input type=text name=A /> <input type=text name=n
I have the following HTML scenario: <div> <input id=txt0 type=text /><input type=checkbox id=chk0 /></div>
I have a login page using jQuery Mobile which contains the following code: <div

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.