when using SimpleModal and open an Iframe it is calling the src twice -
i using simplemodal , opening iframe (using ff) seems work ok in ie9 in ff calling iframe src twice
thanks help
the code calling looks like
function addnew(){ var src = "/php/ftp/parsehome.php?dir="+userdir+"&idx=new"; $.modal('<iframe src="' + src + '" height="445" width="800" style="border:0">', { containercss:{ backgroundcolor:"#e1eff7", bordercolor:"#00a99d", height:450, padding:0, width:840 }, modal: true }); }
i ran same problem. looking @ plugin code...
// add styling , attributes data // append body correct dimensions, move wrap s.d.data = data .attr('id', data.attr('id') || s.o.dataid) .addclass('simplemodal-data') .css($.extend(s.o.datacss, { display: 'none' })) .appendto('body'); data = null;
you can see data
added page body line .appendto('body');
calculate correct dimensions modal. if comment out line, prevent iframe being called twice.
// add styling , attributes data // append body correct dimensions, move wrap s.d.data = data .attr('id', data.attr('id') || s.o.dataid) .addclass('simplemodal-data') .css($.extend(s.o.datacss, { display: 'none' })); data = null;
not sure if modification cause modal size have wrong dimensions, iframe set width=100%
, height=100%
didn't affect me.
Comments
Post a Comment