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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:34:28+00:00 2026-05-23T19:34:28+00:00

I am trying to make a simple upload file system, and this is my

  • 0

I am trying to make a simple upload file system, and this is my code , I hope you can help me, help very appreciated

init.php

   <form method="post" action="" enctype="multipart/form-data">            
            <label for="file">Upload a file</label>
            <input type="file" name="file" id="fileArchivo" />
            <input type="submit" name="submit" id="btnUpload" value="Upload file" />   
        </form>

Ajax mootools method

window.addEvent("domready",function(){
    cargarIndex();                                
});


function loadIndex()
{   
   var Request = new Request({
   method: 'POST', 
   url: '../CONTROLLER/init.php',
   onRequest: function() {}, 
   onSuccess: function(text, xmlrespuesta){
   document.getElementById('archive').innerHTML= texto;
   $('btnUpload').addEvent('click',function(){uploadFile()});  
   },
   onFailure: function(){alert('Error!');}  
   }).send();


}

function uploadFile(){
//$('btnUpload').addEvent('click', function(){
    alert('in');
    archivo = $('fileArchivo').value;
    alert(archivo);
      var nuevoRequest = new Request({  

           method: 'POST',
           data: 'archivo='+archivo,
           url: '../CONTROLLER/controllerSave.php',  
           onRequest: function() {$('subirarchivo2').innerHTML="Cargando...";},
           onSuccess: function(texto, xmlrespuesta) {$('subirarchivo2').set('html',texto);},
           onFailure: function(){alert('Error!');}                                                 
           }).send();           
//});
} 

Firebug says that uncaught exception:

[Exception… “prompt aborted by user” nsresult: “0x80040111
(NS_ERROR_NOT_AVAILABLE)” location: “JS frame ::
resource://gre/components/nsPrompter.js :: openTabPrompt :: line 468”
data: no]

But I dont get the answers, I already search but nothing, the Error alert is in the onFailure in the uploadFile.

  • 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-23T19:34:29+00:00Added an answer on May 23, 2026 at 7:34 pm

    can’t use ajax like so to upload files.

    http://mootools.net/forge/p/form_upload by core member Arian

    http://mootools.net/forge/p/uploadmanager by Thiery Bela

    Both provide sensible solutions via HTML5 interfaces with a flash uploader fallback / degradation for older browsers.

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

Sidebar

Related Questions

I'm trying to make a really simple file upload using jQuery, without having to
I'm trying to make a simple C# web server that, at this stage, you
I'm trying to make a simple php script to find all src attributes from
This is on .Net 4, full framework. I'm trying to make a simple winforms
I am just playing around and trying to make a very simple CMS. Right
I'm trying to make a simple in in-page popup called like this: var test
I'm trying to make a simple MySQL Admin thing with php and jQuery. I've
Trying to make a simple jquery drop down here, here's my code so far:
I have a simple question. I'm trying to upload a file to my ftp
i'm trying to make simple scheduler using Timer and TimerTask classses see the 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.