spacer

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

home / experts / javascript / column35


Bookmarklets and Frames

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

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 >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji


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

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