Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: crud operations within datatables
Post: RE: crud operations within datatables

Ahmed Haroon Wrote: (06-30-2022, 04:01 AM) -- we are using Pik admin panel, and want to write a page which will contains only Datatable for CRUD operations, please help with a Link to step by step gu...
1,070 Views
9 Replies
07-02-2022, 01:29 AM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

@gary thanks for your comment. I have rewritten the jquery ajax per below and I can now getVar!!! The only problem now is getting the 'id' to my model. Here is my jquery ajax: $(document)....
1,772 Views
16 Replies
06-25-2022, 05:36 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

It seems I was posting a JSON object.  Almost there but not. Here is the revised javascript: Code: -- $(document).on('click', '.delete-task', function(event){     // id comes from data-id    ...
1,772 Views
16 Replies
06-24-2022, 11:50 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

spreaderman Wrote: (06-23-2022, 08:00 PM) -- Gary Wrote: (06-23-2022, 11:14 AM) -- Without having looked at all the detail you've pasted, I've had some similar sounding problems with my ajax crud si...
1,772 Views
16 Replies
06-24-2022, 10:14 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

Gary Wrote: (06-23-2022, 11:14 AM) -- Without having looked at all the detail you've pasted, I've had some similar sounding problems with my ajax crud since I've upgraded from 4.1.8 to 4.2.1...  perh...
1,772 Views
16 Replies
06-23-2022, 08:00 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

InsiteFX Wrote: (06-22-2022, 06:36 AM) -- You may need to add the header shown below. Code: -- $.ajax({     url: "your url",     headers: {'X-Requested-With': 'XMLHttpRequest'} }); -- -- Tha...
1,772 Views
16 Replies
06-22-2022, 04:31 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

maulahaz Wrote: (06-21-2022, 11:34 AM) -- Did you try : Code: -- if($id == ""){             $response = [                 'success' => 0,                 'msg' => "No Task To Delete",        ...
1,772 Views
16 Replies
06-21-2022, 06:48 PM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: RE: AJAX / Post / delete record not working

@seunex what do you mean? The path is not the problem as stated above.
1,772 Views
16 Replies
06-21-2022, 09:22 AM
spreaderman
    Thread: AJAX / Post / delete record not working
Post: AJAX / Post / delete record not working

Still having some problems with AJAX crud. For delete, I have the following controller; PHP Code: -- public function task_delete(){ log_message('error', var_dump($_POST)); $id = $thi...
1,772 Views
16 Replies
06-20-2022, 10:42 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

I got this working. Thank you all for your help and suggestions. The controller; PHP Code: -- public function task_create(){ $validation = \Config\Services::validation(); $rules = [ ...
2,118 Views
17 Replies
06-20-2022, 12:04 AM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

Really cannot figure this out but getting somewhat closer.  I have rewritten a lot of my code.  This is where I am at.  This my controller: Code: -- public function task_create(){     $valid...
2,118 Views
17 Replies
06-11-2022, 08:51 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

Thanks and am often using the developer tools to console out debugging info.  I have now turned of csfr per below.  The controller and method sit under Admin.  I have removed the references to csfr an...
2,118 Views
17 Replies
06-08-2022, 07:05 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

ignitedcms Wrote: (06-06-2022, 04:09 AM) -- If you're debugging that, I would strip it down and simplify further, you probably don't need the form action on the form-class either if you're firing it ...
2,118 Views
17 Replies
06-06-2022, 08:26 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

BTW, is this what it is supposed to look like in the NETWORK tab of chrome?  Is it sending correctly? csrf_token_mamamia=[token-snip]&description=canada
2,118 Views
17 Replies
06-06-2022, 02:53 AM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

iRedds Wrote: (06-05-2022, 03:05 AM) -- Speaking of the browser console, I meant the network section. There you can see each request made by the browser (request and response headers, sent data and...
2,118 Views
17 Replies
06-05-2022, 07:53 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

iRedds Wrote: (06-05-2022, 12:18 AM) -- InsiteFX Wrote: (06-04-2022, 11:59 PM) -- Your ajax url is wrong try this one. Code: -- url: "", -- -- url correct. '/admin/tasks/create' is a relati...
2,118 Views
17 Replies
06-05-2022, 02:49 AM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: RE: Cannot get AJAX to work for Post/Create

I cannot seem to find the form data being submitted. It hits the right controller and method though. I should be able to access the form data like this right? $this->request->getVar("descriptio...
2,118 Views
17 Replies
06-04-2022, 07:52 PM
spreaderman
    Thread: Cannot get AJAX to work for Post/Create
Post: Cannot get AJAX to work for Post/Create

This is my controller; PHP Code: -- public function task_create(){ $rules = [ "description" => "required", ]; if (!$this->validate($rules)) { //$errors = $validation->get...
2,118 Views
17 Replies
06-04-2022, 05:53 AM
spreaderman
    Thread: What CI4-related book would you like?
Post: RE: What CI4-related book would you like?

AJAX and CRUD operation, please. Maybe even adding Datatables to the mix :-). I bought Practical CodeIgniter 3 and more recently CodeIgniter 4 Foundations by Lonnie Ezell. Excellent books!! :-)
10,910 Views
21 Replies
06-03-2022, 10:13 PM
spreaderman
    Thread: Leaflet js and getting geojson file not working as expected.
Post: Leaflet js and getting geojson file not working as...

If I put the geojson file inline, it works fine. Here is a sample; Code: -- var geojson = { "type": "FeatureCollection", "generator": "overpass-ide", "copyright": "The data included in th...
432 Views
1 Replies
05-28-2022, 08:50 PM
spreaderman

Theme © iAndrew 2016 - Forum software by © MyBB