Skip to content
Loading
  • Rajeesh Menoth
    0
    Hi,
     
    First check your url in ajax and another use data: "{ UserName: '" + Name + "' }" Instead of data: '{ UserName: Name }'
    0
  • Ramesh Palaniappan
    0
    URL must be wrong. Check it properly.
    1. functioncheck(){
    2. varName=$("#checkid").val();
    3. alert(Name);
    4. $.ajax({
    5. type:"POST",
    6. url:"home/checkname/",
    7. data:'{UserName:Name}',
    8. contentType:"application/json;charset=utf-8",
    9. dataType:"json",
    10. success:OnSuccess,
    11. failure:function(response){
    12. alert(Name);
    13. }
    14. });
    15. }
    0