If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Import data from xml using Javascript

Hello,

I am making an unsecured html login using a javascript switch, but instead of using a switch i would like the script to verify the username and password from an xml file and then if it exists and its the right password it redirects to the desired page, but if it isn't the right password it displays an error message. Any help?

use AJAX calls to parse your XML and then test for the existance using a for loop in your javascript.... However I highly recoomend using server authentication and a databse as it is more secure than having JavaScript makuing a call to an open XML file.

You can see some AJAX tutorials here for AJAX ASP.NET libraries here...