My jquery Not supported at Fire fox and google chrome ???
I am using Htm5 with Jquery But its support only Internet explorer 8.0 but its not support Google chrome and firefox browser ? Please Help me ..
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie6 ielt8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="ie7 ielt8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Login</title>
<!--<link href="style.css" rel="stylesheet" type="text/css" />-->
<!--<script src="js/jquery.js" type="text/javascript"></script>-->
<script src="js/JSon.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
var Type;
var Url;
var Data;
var ContentType;
var DataType;
var ProcessData;
var method;
function CallService() {
$.ajax({
type: Type, //GET or POST or PUT or DELETE verb
url: Url, // Location of the service
data: Data, //Data sent to server
contentType: ContentType, // content type sent to server
dataType: DataType, //Expected data format from server
processdata: ProcessData, //True or False
success: function(msg) {//On Successfull service call
ServiceSucceeded(msg);
},
error: ServiceFailed// When Service call fails
});
}
function ServiceFailed(result) {
alert('Service call failed: ' + result.status + '' + result.statusText);
Type = null; Url = null; Data = null; ContentType = null; DataType = null; ProcessData = null;
}
function GetData() {
Type = "GET";
Url = "http://localhost:4845/Service1.svc/Getdata/1";
ContentType = "application/json; charset=utf-8";
DataType = "json"; ProcessData = false;
method = "GetData";
CallService();
}
function UserValidation() {
var username=document.forms[0]["username"].value;
var pwd=document.forms[0]["password"].value;
Type = "POST";
Url = "Service1.svc/Uservalidation";
Data = '{"username": "' + username + '","password": "' + pwd + '"}';
ContentType = "application/json; charset=utf-8";
DataType = "json"; ProcessData = false;
method = "UserValidation";
CallService();
}
function InsertData() {
Type = "POST";
Url = "Service.svc/InsertData";
Data = '{}';
// Data = '{"Address":"BANGALORE","FirstName":"JANAGAN","Pax":1,"Rate":100,"ResNo":87,"Roomtype":"DELUX"}';
ContentType = "application/json; charset=utf-8";
DataType = "json"; ProcessData = false;
method = "InsertData";
CallService();
}
function ModifyData() {
Type = "PUT";
Url = "Service.svc/ModifyData";
Data = '{}';
// Data = '{"Address":"BANGALORE","FirstName":"JANAGAN","Pax":1,"Rate":100,"ResNo":87,"Roomtype":"DELUX"}';
ContentType = "application/json; charset=utf-8";
DataType = "json"; ProcessData = false;
method = "ModifyData";
CallService();
}
function DeleteData() {
Type = "DELETE";
Url = "Service.svc/DeleteData";
Data = '{}';
// Data = '{"Address":"BANGALORE","FirstName":"JANAGAN","Pax":1,"Rate":100,"ResNo":87,"Roomtype":"DELUX"}';
ContentType = "application/json; charset=utf-8";
DataType = "json"; ProcessData = false;
method = "DeleteData";
CallService();
}
function ServiceSucceeded(result) {
if (DataType == "json") {
var x;
var string =result.status;
if(string == "Success")
{
alert(string);
x=true;
return x;
}
else
{
alert("hi");
x=false;
return x;
}
// alert(string);
}
return x;
}
function ServiceFailed(xhr) {
alert(xhr.responseText);
if (xhr.responseText) {
var err = xhr.responseText;
if (err)
error(err);
else
error({ Message: "Unknown server error." })
}
return;
}
$(document).ready(
function() {
$("#Login").click(function(){
UserValidation();
// alert("HELLO");
});
}
);
</script>
</head>
<body>
<div class="container">
<section id="content">
<form action="Reservation.htm" id="reservation" onsubmit="return ServiceSucceeded" > <!--Reservation.htm-->
<h1>Login Form</h1>
<div>
<input type="text" placeholder="Username" required="" id="username" />
</div>
<div>
<input type="password" placeholder="Password" required="" id="password" />
<p></p>
</div>
<div>
<input type="submit" value="Login" id="Login" /> <!--onclick="UserValidation()" -->
<!--<button type=submit value="Login" id="Login" onclick="UserValidation()"/> -->
</div>
</form><!-- form -->
<div class="button">
</div><!-- button -->
</section><!-- content -->
</div><!-- container -->
</body>
</html>