Remote Content & AJAX

I'm using a remote content asset to include content from another server. The remote content in this instance is a search function, AJAX is used to prompt the user with keywords from a database (these appear in a box below the form field - ala google).


I had no problem getting the remote content page to load and accept search terms, and search as expected - but the AJAX function is not working. When the keyword box appears below the form field, it contains the 'page not found' asset that I specified for this matrix site.



I can tell that this is because the javascript called by the page is not able to find the 'behind the scenes' php file that is part of the AJAX app. This php file has the database query that pulls the keywords from the db.



Has anyone got any ideas about how to do this - or am I asking too much of the remote content function?

have you enabled tunneling for scripts on the remote content?


You're probably asking a bit too much -- we can't tunnel AJAX requests, because we can't rewrite JavaScript on-the-fly. If your backend search is based in MySQL, PostgreSQL or Oracle, you may be able to use the DB Data Source bridge instead, though.

If the requests your AJAX application is making are to absolute URLs and not relative to the current URL of the page, they should be working fine.