ajax - how to get URL with two parameters in javascript? -


i works in mvc 4 project, , have small problem in script, script :

    function isreportcheckpoint(cc,carnum) {     var url = '/home/isreportalertwebservice/'+cc+',' + carnum;//here problem     $.ajax({         type: "post",         url: url,         data: {},         datatype: 'json',     }); }  $(function () {     $("input[name=report]").on('click', function () {         var carnumber = $(this).data('carnum');          isreportcheckpoint(c,carnumber); });  }); 

my problem script consider 2 parameters in url 1 parameter, please if has idea appreciative.

if using jquery post, do:

var url = '/home/isreportalertwebservice';     $.ajax({         type: "post",         url: url,         data: { 'cc' : cc, 'car_num' : carnum },         datatype: 'json',        success: function( response ) {            //response server here        } }); 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -