BrowserPlus™ (sneak peek)

Yahoo! Search

Sample Code

Using BrowserPlus™ is simpler than you might think. We've created some samples to demonstrate how simple.

Samples
  • 1
    Introduction
    How to check for BrowserPlus, and initialize it.
  • 2
    Using Services
    How to specify in your webpage what BrowserPlus services you require.
  • 3
    Errors & Return Values
    How results are asynchronously returned.
  • 4
    Drag And Drop
    Hooking up a drop target in a webpage.
  • 5
    Image Twiddler
    A complete web application that demonstrates client side image manipulation, tying together the concepts thus far.

Introduction
Install BrowserPlus to try out this sample.Run this Code

Description

This is the simplest possible BrowserPlus website. The script tag on line 06 includes the BrowserPlus javascript library which populates the YAHOO.bp namespace with a number of functions.

Once this small (and standalone) library is loaded, we can initialize the BrowserPlus plugin, and invoke a built-in function: YAHOO.bp.getPlatformInfo(). This function returns the current installed version of the BrowserPlus platform.

So what happens if BrowserPlus isn't installed? We'll cover that in sample #3.

Now that you see using BrowserPlus basically involves just the inclusion of a JavaScript library which provides some basic functionality, let's move on to using services...