I have following code.
ASPX Page
<a href="AnyASPXPageOfWebsite.aspx" onclick="javascript:CallJQuery();" > Set Price </a>
JS Code
function CallJQuery() {
var prc = document.getElementById('<%= hdnPrice.ClientID %>');
var strPrc = prc.value;
$.ajax({
type: "POST",
url: "/Services/TestService.asmx/SetPrice",
data: {Price : "'"+ strPrc + "'"},
dataType: "json",
error: function(xml, status) {
alert('Error is ' + status);
},
success: function(xml, status) {
alert('suceess' + status );
}
});
}
Webmethod in TestService.asmx
[WebMethod(EnableSession = true)]
public string SetPrice(string Price)
{
HttpContext.Current.Session["ProdPrice"] = Price;
return "success";
}
My code works in every browser except SAFARI i set breakpoint at SetPrice() method,but its not executed in case of safari. Also success function is executed and alert message is displayed
What is the reason for safari that method is not executed?