I am trying to create a webpage using javscript that uses forms-based authentication to login to a sharepoint server, but it continues to use NTLM, which is Windows-based authentication. Is there a way to allow form-based validation with javascript since this webpage is for mobile and phone calls? Thanks in advance. Any help was appreciated.
My code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="jquery-1.6.2.min.js" type="text/javascript"></script> </head> <body> <div> <script type="text/javascript"> $(document).ready(function () { var soapEnv = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> \ <soap:Body> \ <Login xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \ <username>username1</username> \ <password>password</password> \ </Login> \ </soap:Body> \ </soap:Envelope>" // Call web service $.ajax({ url: "http://servername:serverport/_vti_bin/authentication.asmx", type: "POST", dataType: "xml", data: soapEnv, complete: processListAccessResult, contentType: "text/xml; charset=\"utf-8\"" }); }); // Process result function processListAccessResult(xData, status) { alert(xData); alert(status); } </script> <ul id="data"></ul> </div> </body> </html>
Hong yi
source share