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 Design

Problems making my widget, to display forum topics

Author Message
nemesis256



Joined: 30 Aug 2005
Posts: 4

Posted: Tue Aug 30, 2005 - 11:21 pm    Post subject: Problems making my widget, to display forum topics Reply with quote

I'm trying to make a widget to display the latest posts at my forum. Here's the code I have in my html file
Code:
<div id="text"><script language="JavaScript" type="text/javascript" src="http://myforum.com/topics_anywhere.php?mode=show&f=a&n=10&r=y&b=non&lpb=0&ch=35"></script></div>


As you can see it's using topics anywhere. Now for the problem. The list of posts doesn't show up in dashboard when I run the widget. It works in Safari and Widgetarium though. Any ideas?

BTW, I know almost nothing on CSS and javascript. This widget is my first taste of both.
View user's profile Send private message Send e-mail Widgets
gandreas



Joined: 16 Jun 2005
Posts: 114

Posted: Tue Aug 30, 2005 - 11:46 pm    Post subject: Reply with quote

Make sure that network access is allowed in the InfoPList.


However, your current design has some problems with it - you're telling the web view "here's some JavaScript to load from this URL", but that URL actually is a full web page.

You'd be better off using XMLHttpRequest to grab that, break the results apart and extract the results you want to display, and then set the innerHTML of the div to that.
View user's profile Send private message Send e-mail Widgets
nemesis256



Joined: 30 Aug 2005
Posts: 4

Posted: Wed Aug 31, 2005 - 10:34 am    Post subject: Reply with quote

I allowed network access in the plist and it works! Thanks!

BTW the page I have isn't a "full" webpage, just text and links.
View user's profile Send private message Send e-mail Widgets
aristotle1990



Joined: 20 Jun 2005
Posts: 89
Location: Long Island, New York

Posted: Wed Aug 31, 2005 - 12:51 pm    Post subject: Reply with quote

What? You're saying the above code worked??? Are you serious? That doesn't look valid to me...how'd it end up like that?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Widgets
nemesis256



Joined: 30 Aug 2005
Posts: 4

Posted: Wed Aug 31, 2005 - 1:21 pm    Post subject: Reply with quote

OK maybe it doesn't quite work. There's 2 problems.

First, the links open up in the widget. How can I make it open in safari or the default browser?

Second, the topics don't update. How can I make it so it updates say every 5 minutes?
View user's profile Send private message Send e-mail Widgets
friedguy



Joined: 02 Jun 2005
Posts: 25

Posted: Wed Aug 31, 2005 - 1:44 pm    Post subject: Reply with quote

You are probably going to have to go with gandreas' suggestion. All you are doing is making your widget a web browser (in a way).
View user's profile Send private message Send e-mail Widgets
nemesis256



Joined: 30 Aug 2005
Posts: 4

Posted: Wed Aug 31, 2005 - 2:10 pm    Post subject: Reply with quote

so how would I do that? Remember I'm a noob at this Razz
View user's profile Send private message Send e-mail 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