LinkButtons - do they work on FBML Canvas pages?

Nov 9, 2007 at 2:27 PM
I'm building an FBML Canvas app. I've gotten Button objects to work just fine but I find that when I try to add a LinkButton to the page, I get the following error:

URLExceptionInvalid scheme for url (javascript:__doPostBack('MessagesArea1$LinkButton1','')

Is it possible to use LinkButtons on FBML Canvas pages? I know that Facebook restricts Javascript on FBML Canvas pages so maybe no. Anyone know?

Nov 9, 2007 at 3:38 PM
I don't know for sure, which I guess is what you're asking for, but from what I can tell from this wiki page ( and from the error you saw, I don't think calling javascript from an href attribute is supported. If you look down at the "The basics" section and look at the sample code, you can see that they use the "onclick" attribute instead. If there's a way to configure how LinkButton outputs its HTML and Javascript (so that it uses onclick instead of href), you might be able to use them that way, but otherwise I think you'd have to make your own (assuming IFrames aren't an option for you).
Nov 9, 2007 at 8:33 PM
Thanks - it looked as if it wouldn't work. I've been getting by with regular Buttons and also Hyperlinks with values embedded in the URLs - the old way of doing web programming!