Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As you writed it in your question title, i suggeste that you used a bit of javascript, either JQuery or prototype can do the job.</p> <p>Since I know more about this last one, i will give some piece of code</p> <p>here is the process I understand for your case.</p> <p>First your server send a page with a form. Then the user select a file and click the send button, the page does not reload and use Ajax to do the job then JQuery get the data and send it to your server via Ajax (<code>request();</code>) then The server send back the results, and you can display it <code>displayFilesList();</code></p> <p><code>your_form_id</code> is your form id</p> <p><code>submitForm</code> is the name of the function called when your form will be submitted</p> <p><code>displayFilesList</code> will be the function called when your server will send back the results this function also expect you to send back the results in a json format</p> <pre><code>$('#your_form_id').submit(submitForm); function submitForm() { var data = $('#your_form_id').serializeArray(); //Code to remove the send button here //Code to insert a loading.gif request("/your/url", data, displayFilesList); return false; } function displayFilesList(jsonResult) { var data = jQuery.parseJSON(jsonResult); //Code to display the files list here // } function request(url, paramPost, successCallback, errorCallback) { if ((typeof successCallback == 'undefined') || (successCallback == null)) successCallback = dispSuccess; if ((typeof errorCallback == 'undefined') || (errorCallback == null)) errorCallback = dispError; var AjaxUrl = url; $.ajax({ type: "POST", url: AjaxUrl, data: paramPost } ).done( function(msg) { successCallback(msg); } ).fail( function(jqXHR, textStatus, errorThrown) { errorCallback(jqXHR, textStatus, errorThrown); } ); } function dispError(jqXHR, textStatus, errorThrown) { alert(jqXHR.responseText); } function dispSuccess(html) { alert(html); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload