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 Central

Need some help with openURL

Author Message
EricWood



Joined: 20 Nov 2006
Posts: 26
Location: Austin

Posted: Wed Dec 20, 2006 - 1:30 pm    Post subject: Need some help with openURL Reply with quote

My problem probably has a simple solution, but I can't seem to figure it out.
The widget I'm working on is an update of the Onion Headlines widget, which will now include a small summary of the headlines and a little button the user can click to take them to the full article.
Here's the problem: When any of the buttons are clicked, it opens the url of the last headline in the list. I'm pretty sure that's because of this code:
Code:
var img = document.createElement("img");
img.src="arrow.gif";
img.className="linkImg";
img.onclick = function() { widget.openURL(url); }

My best guess is that each of the images points to the same onclick method, which gets rewritten for each of the headlines, resulting in each of them pointing to the last headline's url.
How do I fix this?
Thanks for any help you guys give me! This bug is what's keeping me from releasing the update.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
EricWood



Joined: 20 Nov 2006
Posts: 26
Location: Austin

Posted: Thu Dec 21, 2006 - 3:04 pm    Post subject: Reply with quote

Nevermind. I solved the problem.
I'm too lazy to post the replacement code, but if anybody wants to see it (which I doubt they will), I'll post it.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
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