Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-07-29 15:00:31

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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&timestamp=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

#14 2009-07-29 15:53:56

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

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.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#15 2009-07-29 19:13:47

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 999
Website

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

Board footer

Powered by FluxBB