AJAX help wanted |
I have managed to get an CI4 AJAX Dynamic Search routine working but it was an 'Orrible Kludge.
I had a tremendous amount of problems in trying to call this dbSearchResults.php file using the following JavaScript: Code: <script type="text/javascript"> My knowledge of JavaScript is very basic and no solved or other solutions were found. I would be very grateful for a link to a tutorial. If none are available then I would like to know the correct method to call and use a PHP file with AJAX.
First, load jQuery in the head section of your view.
Then, before the </body> closing tag, have this piece of code: Code: <script> In the controller, use $this->input->get('p1') to read the value of p1. Let the controller method echo the data that you need back in the view.
(07-18-2017, 10:41 AM)Wouter60 Wrote: First, load jQuery in the head section of your view. Many thanks for the suggestion. The following day I tried the AJAX call again and it worked for some weird reason! The previous day I had checked the filename and path, also tried renaming the file and using a different path, checked log files, file permissions, htaccess file, etc, etc, etc and all to no avail. Don't you love programming
I have had that happen before, I reboot my computer system and then everything is fine.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-21-2017, 01:22 AM)John_Betong Wrote: Don't you love programming LOL. For a whole day I had a https error message implying my domain name was not secure. Today it just suddenly disappeared. WTF? I sometimes wonder what my host is actually doing at times. Just cannot be bothered to change but perhaps I should. Paul. |
Welcome Guest, Not a member yet? Register Sign In |