O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Painless Image Submitting

Problem

I’ve spent hours making beautiful image buttons that I want to use to submit forms, but I can’t get them to work. Help!

Solution

Help is on the way. Use the fb:submit tag to wrap your images:

<form method="post" action="http://someserver.com/somePage.php">
    <fb:submit><img src="http://someserver.com/images/button.jpg"></fb:submit>
</form>

Discussion

Image buttons are all well and good, but make sure that they actually look clickable, or people are going to have a whole lot of nasty things to say about your app when they can’t make it work.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required