0

I have an HTML table that should be updated according the file that user uploads. In other words, I would like user to be able to upload a file, and change the contents of the table according to file content. The file size can be several MB. What are my options ? Do I must to upload the file to a server, or it can be done in client side ? Thanks !

2
  • Are you saying you want the contents of the uploaded file to populate the HTML table? Commented Apr 28, 2010 at 5:21
  • Kind of. I want to change the background of table cells based on file's content. Commented Apr 28, 2010 at 5:29

3 Answers 3

1

No, you cannot manipulate files on the client side. Unless you convince the user to turn off security for your application.

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

2 Comments

Sounds reasonable. Could you give a pointer to some example of uploading to the server ?
You should use a form with <input type="file"> in it. Just search for it, you will find an abundance of examples.
0

You can upload the file in pre-determined XML format and then bind HTML table to XML data island.

See this example: http://www.users.cloud9.net/~bradmcc/xmlisland.html

Although, I'm not sure if this technique works with Chrome.

Comments

0

The only way you could do this would be to upload the file to the server, process the file there and then return a set of values which need to be inserted into your page.

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.