Welcome Guest, Not a member yet? Register   Sign In
Cannot get AJAX to work for Post/Create

(06-05-2022, 12:18 AM)iRedds Wrote:
(06-04-2022, 11:59 PM)InsiteFX Wrote: Your ajax url is wrong try this one.

url: "<?= base_url('admin/tasks/create');?>",

url correct.

'/admin/tasks/create' is a relative path and will use the domain of the loaded page.

for page https://domain/some/page, '/admin/tasks/create'  -> https://domain/admin/tasks/create

Thanks, I always used the base_url and never had a problem with ajax. but this is good to know.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Messages In This Thread
RE: Cannot get AJAX to work for Post/Create - by InsiteFX - 06-05-2022, 11:15 PM

Theme © iAndrew 2016 - Forum software by © MyBB