CodeIgniter Forums
Redirect within controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Redirect within controller (/showthread.php?tid=73891)



Redirect within controller - Mekaboo - 06-19-2019

Hello!

I found a chatbot to add to my site and it works but the issue is that it redirects to my landing page (which was the original welcome message page). Im believe I have to change something within the contoller but dont know where. Trying to fix it that when I hit submit instead  of going to another page the comment/words are in the message board. Here is the git Im using:

https://github.com/afiefsky/chatapp-codeigniter-ajax

Where do I make the change?

Heart Heart ,
Mekaboo


RE: Redirect within controller - Digital_Wolf - 06-19-2019

(06-19-2019, 12:18 PM)Mekaboo Wrote: Hello!

I found a chatbot to add to my site and it works but the issue is that it redirects to my landing page (which was the original welcome message page). Im believe I have to change something within the contoller but dont know where. Trying to fix it that when I hit submit instead  of going to another page the comment/words are in the message board. Here is the git Im using:

https://github.com/afiefsky/chatapp-codeigniter-ajax

Where do I make the change?

Heart Heart ,
Mekaboo

I'm not sure, but if this chatbot uses ajax, then it should not reload the page ... if it does it, then you probably don’t have this: "event.preventDefault ();", and also in the tag "<form > ", you need to change the action =" Link "attribute to an empty value.


RE: Redirect within controller - Mekaboo - 06-20-2019

(06-19-2019, 12:33 PM)Digital_Wolf Wrote:
(06-19-2019, 12:18 PM)Mekaboo Wrote: Hello!

I found a chatbot to add to my site and it works but the issue is that it redirects to my landing page (which was the original welcome message page). Im believe I have to change something within the contoller but dont know where. Trying to fix it that when I hit submit instead  of going to another page the comment/words are in the message board. Here is the git Im using:

https://github.com/afiefsky/chatapp-codeigniter-ajax

Where do I make the change?

Heart Heart ,
Mekaboo

I'm not sure, but if this chatbot uses ajax, then it should not reload the page ... if it does it, then you probably don’t have this: "event.preventDefault ();", and also in the tag "<form > ", you need to change the action =" Link "attribute to an empty value.

Thanks so very much Heart

Question: would I place the event, with the controller of view?


RE: Redirect within controller - Digital_Wolf - 06-21-2019

(06-20-2019, 12:00 PM)Mekaboo Wrote: Thanks so very much Heart

Question: would I place the event, with the controller of view?

I don't know if you'll place this event or not...

P.S.: Or I not so understood you, sorry but I not know English on all 100%



RE: Redirect within controller - InsiteFX - 06-21-2019

Here is another chat system for CodeIgniter I found today.

Facebook-like chat - Using CodeIgniter

A facebook-like chat implemented with using jQuery and CodeIgniter.


RE: Redirect within controller - Mekaboo - 06-22-2019

(06-21-2019, 07:28 AM)Digital_Wolf Wrote:
(06-20-2019, 12:00 PM)Mekaboo Wrote: Thanks so very much Heart

Question: would I place the event, with the controller of view?

I don't know if you'll place this event or not...

P.S.: Or I not so understood you, sorry but I not know English on all 100%
Sorry about that, no worries Heart


RE: Redirect within controller - Mekaboo - 06-22-2019

(06-21-2019, 08:14 AM)InsiteFX Wrote: Here is another chat system for CodeIgniter I found today.

Facebook-like chat - Using CodeIgniter

A facebook-like chat implemented with using jQuery and CodeIgniter.

Thanks a bunches, I will check this out for sure Heart