1

I am working on a PHP application that asks users to upload a CSV file, then inserts the CSV file records into the database and finally deletes the file. Everything is working fine. Only problem is there are multiple JQuery tabs on my page with 'Upload CSV' being one of the many tabs. Hence I'd like to upload a file without page getting refreshed, because when it refreshes the current tab loses focus and the default tab opens up.

What could be the best possible solution in this case ?

0

3 Answers 3

2

Us this : http://blueimp.github.com/jQuery-File-Upload/ Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.

Sign up to request clarification or add additional context in comments.

Comments

0

Upload file using JQuery itself or add some hidden input in your upload form that will have value of opened tab id and after refresh set focus on that tab.

Comments

0
$.ajax
({
    type: "POST",
    url: "upload.php",
    success: function()
    {
        alert("uploaded");
    }
});

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.