tags:

views:

25

answers:

1

Hi,

I'm looking for a way to let user upload a config file (text base, no encryption), then parsing that file (either line by line or separating fields by commas,...) to pre-fill textboxes field on the same page using javascript.

Thanks for your help :)

+1  A: 

First, you'll have to handle the upload via a ajax upload. Your javascript then can make an ajax call out to get the contents of the HTML file. What exactly are your need beyond this?

altCognito
well in my config page of the site there are fields that the user can save to a file and restore it later to restore the config (kinda like backup/restore config of a router). But instead of actually commit the config, it just need to pre-fill textboxes on the page. The user will then have the ability to commit or modify couple fields then submit.
jerrytouille