skip to Main Content

how to enter dynamic data to a javascript function after page load – Jquery

I have a select box which options are coming from database depending on another selected option using ajax $(document).ready(function(){ $("select.entity").change(function(){ var selectedEntity = $(".entity option:selected").val(); $.ajax({ type: "POST", url: "entityName.php", data: { entity : selectedEntity } }).done(function(data){ $("#entityName").html(data); }); });…

VIEW QUESTION

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
Back To Top
Search