Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: How can I get Jquery to interact with my Textpattern database?
I do believe you’re a genius, sir!
I’ve fixed all the problems you identified, but it still isn’t working— I even installed rah_external_output to make sure it was publishing the correct MIME-type. I fired up Safari’s Web inspector to see what was loading, and here’s what I found:
All the javascript components are loading correctly, including the array. But when I begin typing in the autocomplete input field, something strange happens— the browser tries to load a new page at a path like this:
XHR finished loading: "http://example.tld/my-page/autodata?q=tes&limit=150×tamp=1248877566534".
…where “tes” is my input. The browser attempts to load a url like this for each letter that is added to the input.
Textpattern returns 404 errors for these urls, understandably. What I can’t understand is why the script is requesting these paths.
Thank you again!
Offline
Re: How can I get Jquery to interact with my Textpattern database?
Not sure I can help much more without looking at the site. Feel free to message me a url if you don’t want it posted.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
Re: How can I get Jquery to interact with my Textpattern database?
Your revised code works. Thanks for helping make my day a bit more awesome, true to your forum signature!
The leading spaces might be a problem. When I test with this data I have to enter a space first to get a match.
As a footnote, here’s how I cleaned up the data in case anyone else ever needs to get rid of leading or trailing spaces.
In phpMyAdmin, I entered the following SQL queries (replace mycolumn
with the actual field):
UPDATE textpattern SET mycolumn=LTRIM(mycolumn);
UPDATE textpattern SET mycolumn=RTRIM(mycolumn);
Offline