You can't create panel through the iframe but you can post message to the iframe to create it. Some code looks like this:
iframe.htm
var _panel = ''+
'<div id="p" class="easyui-panel" closed="true" title="Panel" style="width:50%;height:200px;padding:10px;">'+
' Some sample text inside Panel.'+
'</div>';
var data = {
act: 'createpanel',
msg: _panel
}
$('iframe')[0].contentWindow.postMessage(data,'*');
main.htm
window.addEventListener('message', function(e){
$('#myDiv').html(e.data.msg);
$.parser.parse($('#myDiv'))
$('#p').panel('open')
}, false)