php - Iframe takes time to load -


i want show smartphp calendar in iframe take time load/show.a white/bland page shows @ start

here code

<table id="table_1" class="form_table" align="center" cellpadding="0" cellspacing="0"> <tbody>   <tr><td width="1250" height="950"> <iframe id="myiframe" src="" width="100%" height="950" frameborder="0"  /></iframe>   </td></tr></tbody></table> 

here jquery

$(document).ready(function(){  $('#myiframe').attr('src','http://mysite.com/smartphpcalendar/index.php');  }); 

i have 2 questions

1 - how can reduce loading time?

2- how show loading message/loader image users not disappoint , wait.

why wait until whole site loaded trigger loading of iframes content? force delay way.

instead of triggering loading $(document).ready... function put contens url in iframe src tag:

<iframe id="myiframe"          src="http://mysite.com/smartphpcalendar/index.php"          width="100%" height="950" frameborder="0"> </iframe> 

that way browser can start loading content before whole page has been setup.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -