开发者

reRendering Tweet Button on JSF

I'm following Twitter website to create a Tweet Button on my own website. The problem is, when I reRender the page, it reRenders the 开发者_C百科button too, and I don't know why, but the button just disappears.

I'm using JSF 1.2

<a href="http://twitter.com/share" class="twitter-share-button" 
                    data-url="http://www.mywebsite.com" 
                    data-text="My Text"
                    data-count="vertical" 
                    data-via="MyTwitter">Tweet
                    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"/></a>

Before

reRendering Tweet Button on JSF

after

reRendering Tweet Button on JSF


I've switched to iframe

<iframe frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?counturl=http://www.mywebsite.com&amp;count=vertical&amp;via=mytwitter&amp;text=My%20Text&amp;url=http://www.mywebsite.com&amp;"
                        style="width:55px; height:65px; overflow:hidden; position:relative;" />

By doing this, reRender will not affect the button.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜