• Note that url must be full, absolute path to file on your server — not a canvas page (apps.facebook…).
  • One you should note that there is no “setInnerHtml” call in FBJS for security reasons. If you want to add dynamic HTML you must add it on the server side and pass it using the setInnerFBML call. (Beta. You can now use setInnerXHTML to pass HTML back from Ajax calls. You can also use FBJS_LocalProxy to bypass the Facebook server hop.)
  • Don’t pass HTML with setTextValue because it won’t work.
  • Ajax has an apparent short ~10 second max timeout! –Does anyone have an alternative for queries that may take longer for some users?
  • Be aware of silent 5000 byte size limit to JSON replies if JSON is not perfect (use json_encode to avoid this bug) http://bugs.developers.facebook.com/show_bug.cgi?id=363
  • Ideally the url will point to a non-static location that has content sent through some form of CGI. In formal language, the url must respond to a request for application/x-www-form-urlencoded content.
  • When using JSON and setInnerFBML, the prefix of the FBML parameter has to be ‘fbml_’. The parameter will then be sanitised, and passed on to setInnerFBML.
These
links demonstrate the Ajax object:<br />
<a href=”#” onclick=”do_ajax(Ajax.JSON); return
false;”>JSON</a><br />
<a href=”#” onclick=”do_ajax(Ajax.RAW); return
false;”>RAW</a><br />
<a href=”#” onclick=”do_ajax(Ajax.FBML); return
false;”>FBML</a><br />
<label><input type=”checkbox” id=”requirelogin”
checked=”checked” /><span>Require
Login?</span></label><br />
<div><span id=”ajax1″></span><span
id=”ajax2″></span></div>
<script><!–
function do_ajax(type) { var ajax = new Ajax(); ajax.responseType =
type; switch (type) { case Ajax.JSON: ajax.ondone = function(data) {
document.getElementById(’ajax1′).setTextValue(data.message + ‘ The
current time is: ‘ + data.time + ‘. ‘);
document.getElementById(’ajax2′).setInnerFBML(data.fbml_test); } break;
case Ajax.FBML: ajax.ondone = function(data) {
document.getElementById(’ajax1′).setInnerFBML(data);
document.getElementById(’ajax2′).setTextValue(”); } break; case
Ajax.RAW: ajax.ondone = function(data) {
document.getElementById(’ajax1′).setTextValue(data);
document.getElementById(’ajax2′).setTextValue(”); } break; }
ajax.requireLogin =
document.getElementById(’requirelogin’).getChecked();
ajax.post(’http://example.com/testajax.php?t=’+type);
}
//–></script>

Comments No Comments »

As a hockey player, Peter Zezel was expert at taking what was given him and making the best of it. He did the same thing later in his life when he was diagnosed with a rare blood disorder.

Zezel died in a Toronto hospital after being admitted last week when his condition, hemolytic anemia, flared up. He was 44.

Zezel was a defensive stalwart of the Maple Leafs 1993 and 1994 final four teams. An offensive player when he reached Toronto in 1991, (Zezel once scored 33 goals with the Philadelphia Flyers) he immediately adapted to Pat Burns’ demand that he put most of his energy into the defensive part of the game.

Powerfully built with a low sense of gravity, Zezel became an esteemed checker and, thanks to a background in soccer, a force in the face-off circle.

Zezel scored 50-regular season goals as a Leaf but it was his ability to adapt to the defensive game that kept him in the league for 15 years.

“When you look at guys who make the NHL, it’s often about that little extra,” said former Leaf Steve Thomas who played with Zezel when the two were 17-year-old members of the Toronto Marlies. “Peter was one of those guys who was never satisfied with the way he was playing. He always wanted to be a little better.”

Zezel would end up playing on seven teams. A Toronto native, he retired to the city in 1999 and ran a series of hockey and sports camps.

He almost died of his blood condition in 2001 and the medication that kept him alive made him gain a tremendous amount of weight.

Thomas said the physical effects of the medication bothered Zezel. “As a professional athlete, he was aware of what people saw. I think Peter was self-conscious about it and I know a lot of times I told people that the weight was a side-effect of the drugs.”

What Thomas remembers is a kind-hearted competitor.

“I know he told his Mom that he was satisfied with his life, that he had no regrets. He was just a great, great guy. Everyone will miss not having him around.”

Comments 11 Comments »

Free Fire Screensaver screenshot

From Laconic Software:

This nifty screensaver sets your desktop ablaze. When you fire up Free Fire Screensaver (no pun intended), each item on your desktop - including icons and all open windows will appear to catch on fire, glowing and emitting a smoke effect. The crackling and popping sounds, chimes an music that accompany the screensaver are very nice. Free Fire Screensaver includes two perfect built-in soundtracks, but your favorite music can be set as well. Using the “Enter” key, you can even capture a picture of your burning desktop. To help keep Free Fire Screensaver free, it is bundled with optional Crawler Toolbar. It’s a tiny useful add-on for your browser which is not considered to be any kind of malware.

Version 1.31 fixes a general bug when the screensaver would not start automatically on some systems.

See more CNET content tagged:
screensaver

Download

Comments 5 Comments »

I think regarding the dialog, you just want to add some HTML that gets
displayed/hidden with a button, and add both the HTML and the button
stuff into .kupu files for the XSL make system. Then when the user
chooses a symbol to add, do something like (assuming you have the
character is ‘mychar’):

var sel = kupu.getSelection();
var tnode = kupu.getInnerDocument().createTextNode(mychar);
sel.replaceWithNode(tnode, true);

This should replace the current selection with a text node, and select
the added node.

I hope this helps (and indeed works, didn’t actually try)… ;)

Comments 7 Comments »

A friend calls it the Ross and Rachel Factor, this phenomenon that drags otherwise rational people back to the source of their greatest pleasure and their greatest pain.

The allusion is from the television show Friends but in the sports world you don’t have to look a long way to find potent examples. Wendel Clark returned to Toronto as if guided by divine destiny.

Michael Curry was returned to the Detroit Pistons bench after postings elsewhere. A longtime White Sox, Ozzie Guillen returned to the South Side to manage with great success.

And then, of course, there is the case of Paul Maurice, late of the Maple Leafs and the current architect of the Carolina Hurricanes’ appearance in the third round of the playoffs.

They are no fluke. The Hurricanes entered the playoffs playing better than anyone in the East and ousted teams with far superior records, the New Jersey Devils and then the Boston Bruins.

Paul Maurice enjoyed scant success with the Maple Leafs. His teams finished outside the playoffs both seasons and, as Maurice once said, coaching the Maple Leafs brings its own, agonizing loneliness.

“When you make all the right moves, everyone wants to stand beside you and pat you on the back,” he said. “When things don’t workout, you’re by yourself.”

He has plenty of company this year as the Hurricanes have written an intriguing sidebar to the playoffs.

As usual, Maurice is filling reporters’ notebooks and making the oldest credos sound fresh. A Paul Maurice press conference is and always be a revelation. Some guys paint houses. Other guys paint pictures.

“We usually feel if thing go bad, there are mistakes that are correctible,” he was telling reporters in advance of Thursday’s Game 2 of the Conference Finals against Pittsburgh.

“We also don’t expect our team to play a perfect game every night. That way, we can be positive about some of the good things we can do.”

Clearly, this is the coach the Leafs thought they were getting when they offered Maurice a three-year-deal, the first of which was spent babysitting the building during the lockout. He inherited some formidable weapons, a fading but still potent Mats Sundin, lots of playoff experience and expectations to match.

But Andrew Raycroft’s 37-win season would prove illusionary and when the tests came in and showed brand new free agent Jason Blake had leukemia, the season went haywire.

Maurice, along with GM John Ferguson, paid the price but it was damned lonely in the end.

Glad to see he has so much company on the bandwagon. They couldn’t have handed a better man the reins.

Comments No Comments »