Database LiveSearch |
[eluser]boltsabre[/eluser]
Quote:Message: Undefined index: partialSearchYou're not getting your post array index "partialSearch" Code: function getSearchResults(value) {
[eluser]boltsabre[/eluser]
Okay, so your alert is alerting your value, so we know that that is working Code: public function getSearchResults() And are there any error in Firebug console?
[eluser]joe.afusco[/eluser]
$partialSearch is a string. It will be used to reference phone numbers. since it is currently checking users email address', I keep searching for the first few characters of my email that is on the user table. firebug console shows: POST http://localhost/crm/index.php/search/getSearchResults 500 Internal Server Error
[eluser]boltsabre[/eluser]
Are you sure CSRF is not set to true in your config file?
[eluser]joe.afusco[/eluser]
Hmm. It was set to true. Sorry, when you asked if it was autoloaded earlier, I didn't set it to autoload. Didn't know it was in the config file. Sorry about that. It is all working properly now. Thank you all for all the help.
[eluser]boltsabre[/eluser]
lol... yeah, okay, just so you know what was happening: CSRF was set to true (to prevent against cross site hacking). Because you were submitting $_POST values but without the CSRF code/hash it was failing and returning the internal 500 error - which is a good thing! Basically you want to keep it enabled/set to true, so your work is not quiet over yet. Just do a google on "codeigniter submit form via ajax with CSRF enabled" to figure it out, there are a couple of options (I'm at work, cannot remember the syntax off the top of my head). Glad we got there in the end! |
Welcome Guest, Not a member yet? Register Sign In |