Widgets within a page?

Hi guys, I need a bit of advice… I’m fairly new to Rails, the most
I’ve done is get it running and install Radiant for a project I’m
working on… so I havent actually done any rails code as yet… =]

Anyway, I need to implement a type of Ajax livesearch widget on one fo
my pages within Radiant. All it will do is lookup a table in a mysql
db and display the results in a div. Now I’ve used
prototype+scriptaculous before, so I know I can do the front-end part
with plain HTML+Javascript… but I’m not sure where to start with the
backend bit that actually looks up the table, and how to integrate it
with my Radiant site, and stuff like that…

Any help would be greatly appreciated…!

Cheers,

Michael

Michael,

I believe that there is a Search behavior which will do most of what you
want already. I haven’t used it much but I think it can also do all the
livesearch stuff for you.

You can get it from
http://nobits.org/articles/2006/06/10/radiant-search-behaviour/

Chris

Thanks for the reply Chris, but I’m not actually trying to search the
content of my Radiant pages, but rather a table of countries and call
rates, ie. if the user enters ‘un’ in the live search field, it would
display


United Arab Emirates - $0.69
United Kingdom - $0.04
United States - $0.04

in a updated div… any suggestions?

Cheers,

Michael

Thanks for the reply Chris, but I’m not actually trying to search the
content of my Radiant pages, but rather a table of countries and call
rates, ie. if the user enters ‘un’ in the live search field, it would
display


United Arab Emirates - $0.69
United Kingdom - $0.04
United States - $0.04

in a updated div… any suggestions?

Maybe you should be trying to search the content of your Radiant pages!

What about creating a Countries page w/ all the countries as sub-pages,
with the price as a part? Plus a simple SQL query to copy the Countries
table data to the Pages table and restrict the livesearch to that page &
its children, presto!

-jamie

Hi Jamie,

My list of rates has 550+ countries, and I have to import them again
every time I get an updated list… having them as Radiant pages may
get a bit unmanagable… =]

cheers,

michael