spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column35


Bookmarklets and Frames

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

When you run a script from a bookmark, via a bookmarklet, you are actually entering a javascript: URL in the browser's Location bar (Internet Explorer calls it an Address bar). If the current Web page in the browser's window consists of several frames, the script is executed as part of the parent window. For example, if you have a bookmarklet that counts the number of links on the current page, it will not work with a frame-based page.

If a javascript: URL appears in a link, it can refer to a specific frame if the link is located within that frame. However, if you then create a bookmarklet out of that link, you must remember that the bookmarklet executes at the topmost level of the page.

If you pay a visit to bookmarklets.com, you will notice that only some of the scripts are compatible with frame-based documents. They won't generate errors on such pages, but they won't do their job. Generally speaking, bookmarklets that deal with the content of the page will not work with frames, while those that deal with the current location or the browser's window will work flawlessly.

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Created: February 1, 1999
Revised: February 1, 1999

URL: http://www.webreference.com/js/column35/frames.html