User uploads XML, page reads XML and adjusts settings all in javascript

E

edfialk

Hello, I have a page with a few forms up at http://niceguy.wustl.edu/NEISGEI/OMIComp/session.php

I'm trying to work on a way to save and load the page session.
So, what I want is for the user to be able to save and load an xml
file that holds the input values.
Ideally, the user clicks browse, selects their xml file, clicks Load,
and without a refresh all the selection boxes are adjusted to the
settings in the xml file.

Does anyone know if this is possible? I can upload the xml file using
php and then read it with Ajax, but I haven't tied that all in to one
page/action yet.

If anyone had any tips on how to read a remote xml file and then
perform actions, I would GREATLY appreciate it.

Thanks!
-Ed
 
J

jamie.ly

Which do you need to do? If you can upload the xml file via php, you
should be able to read it server-side. Do you actually need to read
it client-side? You could have the user paste the contents into a text
box and then load the xml from there. I don't know if you can load
xml from a user's local machine.
 
E

edfialk

Pasting the xml would work, I might go with that, but I don't think my
boss would want that.

I think I'm going to have to upload it to the server and then read it
and apply changes. Do you know if it possible to do all this without
reloading the page?

My problem with using my php upload example is that the 95% of my page
is written in javascript. The php upload example is completely
separate file that I was merely testing how to upload. If I use
<input type="file">, I would have to submit that form and deal with it
in another page right, or on a reload for my main page? I guess this
wouldn't be too bad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top