Submit form with our page refresh in Servlet

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2012-09-15T03:36:19Z Indexed on 2012/09/15 3:37 UTC
Read the original article Hit count: 83

Filed under:
|
|
<script type="text/javascript">
$(document).ready(function()
{ 
    $('.ibutton').click(function() 
    {
           var ajaxdata=$("#country").val();
           var value = "country="+ajaxdata;            
           $.ajax({
                        url: "saveIt",         
                        type: "POST",                           
                        data: value,
                        cache: false,
                        success: function(data){ 
                                      alert("load success");              
                                }
                    });return false;  
    });   
});

</script>

Friends, i followed every thing but its not working, upon submit, am unable to send the servlet request, saveIt is my url pattern,pls help me.

© Stack Overflow or respective owner

Related posts about java

Related posts about jQuery