What exactly is your tabbar component? If it is dhtmlxtabbar, this one could help you: http://www.dhtmlx.com/docs/products/dhtmlxTabbar/samples/06_behaviors/02_size_by_content.html
But please note, that the iframe is the worst practice here. What is wrong with the first approach? That one is using ajax, thus updates the dom as needed, and autosize (see link above) will work.
Still, if you don't try break to security boundaries, you have means to resize iframe from inside. Take a look here: http://www.pither.com/articles/2010/11/12/resize-iframe-from-within