Recent Widgets


Register for DashboardWidgets

Recent Forums Posts

Partners


iCompositions

MacDesktops.net

RSS Showcase
RSS Comments
RSS Forums

This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. Posted in: Widget Development

widget.openURL bug ?

Author Message
niffel



Joined: 22 Aug 2007
Posts: 1

Posted: Wed Aug 22, 2007 - 2:27 am    Post subject: widget.openURL bug ? Reply with quote

Hi there, I am new to widgte development, and have searched the net for a solution to my problem without any luck. Now I hop that any of you may help me.

I have a simple
Code:

new AppleGlassButton(document.getElementById("myButton"), buttontext", myFunction);


and in "myFunction"

Code:

if (window.widget) {

... code ...
 widget.openURL(urlstr);       
               
}


Then, when i click the button, it behaves differently depending if I have Safari or any other browser set as the default browser.

case: Safari, it behaves correctly and opens the url ONCE

case: FireFox || Opera, it opens the url in TWO tabs..

Has anybody encountered this "bug" ?

Help is greatly appreciated! Smile
View user's profile Send private message Send e-mail Widgets
Greenie



Joined: 08 Jun 2005
Posts: 81

Posted: Wed Aug 22, 2007 - 4:55 am    Post subject: Reply with quote

Hi,

just tested that with one of my widgets and it works as it should (both in Safari and Firefox)

Are you sure that the function is called only once? The reason I ask is that Safari doesn't open another tab if you click on a link that is already open in one tab. Instead, Safari just reloads the same tab. So even if the function would be called twice you wouldn't notice that in Safari. In Firefox, on the other hand, a new tab is created.

The first step I'd try is to alert something in the function and see how many times it is printed in the console. If the function is called twice then it's not a browser but a widget-problem.
View user's profile Send private message Send e-mail AIM Address ICQ NumberWidgets
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

 
Powered by phpBB © 2001, 2002 phpBB Group