Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var host="http://localhost/";
- window.onload = function()
- {
- document.addEventListener("deviceready", init, false);
- }
- function init()
- {
- var myButton = document.getElementById("navigateButton");
- myButton.addEventListener("click", clicked, false);
- }
- function clicked()
- {
- $.ajax({
- type: "POST",
- url: host+"p1/loginprocess.php",
- //data: ({username: un,password:pwd }),
- data:$("#frmlogin").serialize(),
- cache: false,
- dataType: "text",
- success: onSuccess
- });
- }
- function onSuccess(data)
- {
- alert(data);
- if(data=="ok")
- {
- $("#resultLog").html("Validated !");
- }
- else
- {
- $("#resultLog").html("Validation Failed, Contact Admin");
- }
- }
Add Comment
Please, Sign In to add comment