views:

123

answers:

2

Can someone point me to an article (or discuss here) that explains how an add-on/extension can read what a user has completed in a form in a browser so you can present data to them based on the search parameters?

An example would be the Sidestep extension that opens a sidebar when a user searches on an airline/travel site and presents them a Sidestep meta search based on the parameters used on the original airline/travel site.

A: 

extension to what? your body?:)

If you're talking about a browser extension, then i'm pretty sure you are on the wrong way. You could just search for forms in the current page, and based on the field names try to figure out what did the user searched for... A js file, and an AJAX-call is all you need, and you could basically skip the ajax call also... but i generally prefer server-side processing, as the source code is more hidden this way.

Quamis
Sorry - yes browser extensions. What do you mean by "try to figure out what the user searched for"? Sidestep definitely knows what people searched for on the travel sites because their searches are based on what the user searched for. And I know they aren't getting direct connect from all of them
Bobby
so..again, browser extension are bad..i gues you dont want to force your users to use only FF (as far as i know this would be the easiest and way to create browser extensions)my ideea: use javascript, look for submit buttons in the current page and "intercept" the onClick event..
Quamis
or the window.onUnload event and see what values are in the input fields in the page.
Quamis
A: 

Browser extensions are necessarily browser specific. I would look at the APIs for your target browser. Here's a thread on Firefox 3.0 extensions.

sblundy