I/m having many img
tag dynamically printed from facebook album pictures, like below-
echo '<'img src="' . $photo_detail['src_small'] . '" id="imageurl" onclick="return false" />';
I need is- When clicking on image the source of image is should set to- <'input type="hidden" id="imagesrc"/>
value in 开发者_高级运维the form
when submitting the form the value also submitted - like an image picker
To do what you need you will need to have an understanding of Javascript as well as Facebook's custom version of javascript called FBJS (if you are building an FBML canvas application).
If you do not yet have a strong understanding of how to do this outside of Facebook then I recommend reading through a good book on Javascript until you do.
Once you understand how to do this outside of Facebook the following wiki page should be a good guide on how you can use the same technique with FBJS: http://developers.facebook.com/docs/fbjs/
精彩评论