Getting started with the OpenLinkz search widget - read these posts and get up and running

Setting up OpenLinkz OpenLinkz Simplified Changing Appearance of Links OpenLinkz Cheat Sheet

Setting up OpenLinkz

Enabling OpenLinkz in your pages

It is very easy to install the OpenLinkz widget in your web page or blog. The script file needs to be loaded. When the page loads, the functionality will be automatically initialized. The following code snippets show you how to do it.

To load the javascript file at run-time, paste into the HEAD section of your HTML page the following code snippet:

If you are using Blogger or one of the other XML-based blogging applications, you may find that the code snippet above causes an error. In that case, try pasting into the HEAD section of your XML template the following code snippet:

Using OpenLinkz

Please read the post OpenLinkz Simplified to see all the tips on how you can streamline your HTML by leaving out any reference to the OpenLinkz functionality.

To take full advantage of the power of the OpenLinkz widget, however, you need to call a javascript function named openLinkz from the onmouseover event of either an ANCHOR tag or a SPAN tag. The openLinkz function is flexible. It can take one, two or three parameters.

(1) The word 'this' (with no quotes) must always be the first parameter.
(2) The primary search word must always be the second parameter. In the case of a stockLink, this must be the symbol for the stock.
(3) The third parameter is optional. It can be any search term that enhances the search experience. In the stockLink example, you could pass the company name in this parameter to enhance the search capability. This where you can really fine tune the search.

Note that the tag must have the correct class in order to work properly. At this time it can be either "stockLink", "newsLink" or "techLink". Be careful: it is case sensitive and must be spelled exactly as shown. This is the one thing that must always be included in your tag in order for the OpenLinkz widget to work.

An example of using StockLinkz (OpenLinkz for the stock market) with an anchor tag and the stock symbol:

Here's how the example above looks: Microsoft (MSFT)

There may be situations where you are using a classname for your anchor tags already in order to give links a particular look or style. No problem. In this case, you can implement OpenLinkz using a span tag and your links will remain just as you like them. An example of using TechLinkz with a span tag and two search terms:

Here's how the example above looks in a sentence: AJAX is driving the growth of Web 2.0

You can download the OpenLinkz Javascript file in zip format. Unzip and paste the code directly into your pages or install the Javascript file on your own web server. Get it now!

Be sure to review the other posts on setting up the OpenLinkz widget, especially OpenLinkz Simplified and OpenLinkz Cheat Sheet.

Posted by TradeRadarOperator at 4/19/2007 12:09:00 PM  


Post a Comment


Support our sponsors!
Close this ad panelX