skip to Main Content

How do I redirect with ajax to a dynamic link in laravel

I'm trying to return a view with some data in it with ajax I tried like this: $.ajax({ url: '/canvas', data:{ size:data.drawing['canvas_size'], name: data.drawing['name'], id: data.drawing['id'] } });` and this is the route: Route::get('canvas/{size}/{name?}/{id?}',[DrawingController::class,'canvas'])->name('canvas'); it just gives the 404 error,can…

VIEW QUESTION

How to POST two parameters in PHP using Ajax – Jquery

I want to pass two parameters into the function getStuName() but found that there is error. Can anyone help me with the syntax? <script language="javascript"> function getStuName1(val, val1) { if(val!=''){ $.ajax({ type: "POST", url: "get_stuname1.php", data:'yr='+val+'&classname='+val1, success: function(data){ $("#stu-list1").html(data); }…

VIEW QUESTION
Back To Top
Search