html - how to reduce time to load jsp page while using iframe tag in it? -
i have jsp page in populating jsp page usingiframe, problem here when page(main page) loaded after div using iframe loaded , unfortunately page taking time load shows blank @ div time. can 1 tell me how page(main page) should loaded when iframe in loaded ?
<body> <p>welcome stcak</p> <div id="pageid"> <iframe src="innerpage.jsp" frameborder="0" width="1000" height="510"></iframe> <div> </body>
i think asking how can load main page, load iframe. if case, can use simple ajax. in case i'm using jquery set source iframe after rest of main page has been loaded.
this way main page load, once complete can tell iframe load.
<!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>insert title here</title> <script src="jquery-1.9.0.min.js"></script> <script type="text/javascript"> //<![cdata[ $(document).ready(function(){ $('#myiframe').attr('src','innerpage.jsp'); }); //]]> </script> </head> <body> <p>welcome stack</p> <div id="pageid"> <iframe src="" id="myiframe" frameborder="1" width="1000" height="510"></iframe> </div> <p>content should display prior iframe load...</p> </body> </html>
Comments
Post a Comment