Date: Sun, 12 Jun 2005 11:21:33 -0700
From: Christian <email@hidden>
Subject: Re: iframe link to open Safari
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes;
format=flowed
You don't need the "window.xxx."—the call is simply widget.openURL
(url). The widget object that the Dashboard runtime injects into the
web view is independent of the DOM, so you don't have to trace back
to it, provide a path, etc.
On Jun 12, 2005, at 2:44 AM, Steve Weyer wrote:
I have a similar situation in 10.4.1. I display one of two pages
in an iframe -- both come from a server that I control. one is PHP;
the other is vanilla HTML.
I can use "if (window.widget) window.widget.openURL(...)" in the
main window of my widget it works fine -- opens a Safari window
however, if I set up a script within an iframe to open a link,
window.widget fails. so does window.top.widget and
window.parent.widget.
// in iframe
function wclick(link) {
if (window.top && window.top.widget) {
window.top.widget.openURL(link.href);
return false;
};
link.target = "_top";
return true;
}
...
<A href="some link" onClick="return wclick(this)">
clicking on the link works fine in Safari (i.e., displays link in
main window, not the iframe)
but widget displays in "_top" also -- doesn't use openURL.
if window.top isn't the correct way to access main window, what is?
or other workaround?
or is this a bug in current widget? or somehow considered a
security hole?
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
------------------------------
_______________________________________________
Dashboard-dev mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/dashboard-dev
End of Dashboard-dev Digest, Vol 2, Issue 11
********************************************