Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iframe link to open Safari




On Jun 13, 2005, at 3:05 PM, email@hidden wrote:


Message: 7
Date: Sun, 12 Jun 2005 15:59:11 -0700
From: Christian <email@hidden>
Subject: Re: iframe link to open Safari

Well, you're right, sort of... you'll need to access it via the
parent page—a relative path vs. the frame; the following code does that:


<div onclick="parent.widget.openURL('http://
developer.apple.com/');">Click Me.</div>
...

we're getting close!

if (parent.window.widget) {parent.widget.openURL...}
or
if (parent.widget) {parent.widget.openURL...}

appears to work fine -- if the iframe is a local file, i.e., inside the widget. thanks.

however, if the iframe file is remote, it fails (it doesn't open Safari; linked page opens in the widget itself).


here's an example I concocted: http://home.comcast.net/~saweyer/test/IframeLinkTest.wdgt.zip

when it opens, it uses the local file (IframeContent.html) -- the two embedded links open the Apple web site in Safari. so far so good.

if you then select Remote from menu, it updates to the remote version of the file -- filename has "2" suffix;
and table label omits "loc" prefix for iframe heading; otherwise, everything else, javascript & links are identical.
links in iframe fail to open Safari but display inside the widget.


suggestions?

thanks

Steve




_______________________________________________ Do not post admin requests to the list. They will be ignored. Dashboard-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/dashboard-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.