![]() |
The iRider web browser lets you open multiple pages at once in several ways, from links on a standard webpage and from Favorites (bookmarks). Webpages can also be created with links called book links that open multiple pages at once in iRider examples of this can be seen on the iRider Great Rides page. This document describes the very simple steps that website authors can use to create book links. Even if you don't want to create book links on any public webpages, they can be very useful for creating powerful private custom browsing tools for particular tasks. Be sure to check out Special Applications, below, for an interesting example of this: a simple research tool for potential product/company names. This note assumes an understanding of the fundamentals of web authoring, including HTML and Javascript.
It's currently only possible to create iRider book links using client-side scripting in Javascript (aka JScript), or Microsoft's VBScript. If users turn off scripting functionality in their Internet settings a rare but possible occurrence such book links won't work.
The pages in a book link are opened by simply calling the window object's open() method once for each page in the book: open ("http://www.url1.com/"); (The window object is the default target in a webpage's script, so you can generally just use "open()" instead of "window.open()".) The rest of the arguments to open() are ignored and can be omitted. iRider automatically interprets the mouse button correctly for normal navigation or Surf-Ahead, and either selects or queues the first page opened.
The book link itself can be defined in any way that causes a script with open() calls to be executed, but the most obvious way is with an <a> tag and an onClick handler script: <a href="#" onClick="open ('http://www.url1.com');
open ('http://www.url2.com'); return false"> Notice that the href attribute simply specifies an empty anchor. This will have no effect other than to make the contents of the <a> tag a clickable link. You should also return false from the handler so that normal link processing is cancelled and the onClick event doesn't bubble to other handlers.
Opening several URLs directly within an onClick handler script can get very unwieldy, and isn't the best programming practice. A better approach is to define an Array of URL strings and use a simple function to open all of them. Fortunately iRider itself makes it easy to do this: if you hold down the Alt key while using the Edit/Copy Pages as URLs command, the URLs are copied in the form of a Javascript array as shown here: <script> var ShoppingBook = new Array ( function openBook (book) </script> Then your onClick handler can just pass the array to the function: onClick="openBook(ShoppingBook); return false"
It's important that any public webpage you create with book links determines whether a user is running iRider, and, if not, disable or hide the book link, or request confirmation before opening it. Obviously, most users won't want to deal with dozens of windows if they're running one of those dinosaur browsers. (You may want to present all the links in the book in another manner.) You can detect the presence of iRider in a script by looking for "iRider" in the navigator.userAgent string: if (navigator.userAgent.indexOf ("iRider") ==
-1)
Even if you have no intention of creating book links on public webpages, they can still come in very handy as simple but powerful tools for private use, to greatly accelerate certain web browsing tasks. A great example is a name search tool, for use in trying to choose a name for a product or company. Anyone who's done it can tell you that thinking of names and checking for conflicts with existing names can be a complicated and difficult task, and it's useful to search several websites to get information about candidate names:
Performing all these searches on every candidate name using an ordinary browser would require either a lot of patience or a platoon of interns. With iRider, you can create a simple page to do all of these with a single click. First, create a page with a simple form containing a text input field where candidate names will be entered, and a submit button. Then add an onSubmit handler to the <form> tag: this handler calls window.open() for each name lookup, forming the correct URL strings. For example: <form method="post" onSubmit="lookup(theName.value);
return false"> <script> function lookup (name) </script> To determine the correct URL syntax for any particular site, just try a search or submission the old fashioned way and use that URL as a template for the string expression to be passed to open(). Now just open this page in iRider and enter names to quickly check several different sources for possible conflicts at once. Will you ever do it the old way again? |
|||||
Copyright © 2003-2008 by Wymea Bay. All rights reserved.
Products and services referenced herein are trademarks or service marks of their respective holders.