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
after
I've switched to iframe
<iframe frameborder="0" scrolling="no" src="http://platform.twitter.com/widgets/tweet_button.html?counturl=http://www.mywebsite.com&count=vertical&via=mytwitter&text=My%20Text&url=http://www.mywebsite.com&"
style="width:55px; height:65px; overflow:hidden; position:relative;" />
By doing this, reRender will not affect the button.
精彩评论