Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

calling a java function onClick with ajax

<script type="text/javascript">
        $(document).ready(function() {
            $('#sendMailBtn').click(function (){
                $.ajax({
                    type: "post",
                    url: "/path", 
                    data: "email=" + $('#email').val() + "&subject="+$('#subject').val() + "&msg=" + $('#msg').val(),
                    success: function(msg){      
                        //
                    }
                });
            });
        });
 </script>
Comment

PREVIOUS NEXT
Code Example
Javascript :: js string for each char 
Javascript :: wait until foreach is done javascript 
Javascript :: canvas font colour 
Javascript :: numeros primos js 
Javascript :: javascript remove src from img 
Javascript :: how to get a random element of an array javascript 
Javascript :: javascript get seconds between two dates 
Javascript :: get selected text of html dropdown in javascript 
Javascript :: Math.random javascript double 
Javascript :: javascript get current date jalali 
Javascript :: jquery onclick not working 
Javascript :: express get full url 
Javascript :: collision circle 
Javascript :: detect os javascript 
Javascript :: npm ERR! code ENOENT npm ERR! syscall rename 
Javascript :: delete cr eslint 
Javascript :: check class exist in element by parent id in jquery 
Javascript :: javascript add day to date 
Javascript :: javascript sort array by Z-A in js 
Javascript :: random code js 
Javascript :: phone number regex angular 
Javascript :: upload file using ajax 
Javascript :: reactjs onclick open new page 
Javascript :: Bootstrap modal hide and show 
Javascript :: javascript repeat element in array 
Javascript :: python dictionary to json 
Javascript :: How to change favicon in nextjs. 
Javascript :: how to check if a json object contains a key in jquery 
Javascript :: mac install jmeter 
Javascript :: mongodb create index unique 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =