NeoMarine Posted November 15, 2008 Share Posted November 15, 2008 Any Ideas? I have a layout which contains a header, left vertical rule, center-content, right vertical rule and footer - in that order (same loading order, also). The vertical rules are left/right of the center-content, the header is at the top and footer below everything else. Essentially, I would like the center-content to actually "load" last. I'm thinking, if this is not possible through a realistic~css~layout, perhaps there is a method with AJAX/javascript - in which I would be all ears for that and any ideas you have! Thank you! Quote Link to comment Share on other sites More sharing options...
F1Fan Posted November 15, 2008 Share Posted November 15, 2008 Yes, I think you should use JavaScript and/or AJAX. You could call a JS function with the onload event on the body tag. Then, after everything else loads, you will load the content, or "center" piece of the page. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 15, 2008 Share Posted November 15, 2008 this is def java or ajax one question tho why would you want it im interested Quote Link to comment Share on other sites More sharing options...
NeoMarine Posted November 15, 2008 Author Share Posted November 15, 2008 Well, the thing I would be worried about is loading the content through AJAX because it would cause Google to be unable to index that content. Perhaps if I use <noscript> in combination, where inside <noscript></noscript> I output the exact same content I would with "onload=ajaxScript();" type functionality? @dropfaith I'd like to show a "loading content" display for the center-content... also, I'd like the "framework" to load, and then the "content" so my site looks as professional as possible. ~just trying to add a little spark* to my web development. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 15, 2008 Share Posted November 15, 2008 flash hrmm im not sure you can use a flash element like that some other options <meta name="refresh" content="10;page2.html"> will load a page you can design how you like then redirect to page2.html after 10 seconds you could use a php call before any of the first opening html tag (or declaration) <?php sleep(10); ?> where '10' is 10 seconds. The javascript code to invoke a function after 10 seconds is: setTimeout( function() { /* update div code here */ }, 10000); To get that to run when the page loads do: <script type="text/javascript"> window.onload = setTimeout( function() { /* update div code here */ }, 10000); </script> okay my last option i will give here <Html> <head> <script type="text/javascript"> var Interval; function delay() { Interval=window.setInterval("document.write('another message')", 2000); // function will be called every 2 seconds // Note that you can add any parameters to the function call. } </script> </head> <body onload="delay()"> </body> </html> Quote Link to comment Share on other sites More sharing options...
NeoMarine Posted November 15, 2008 Author Share Posted November 15, 2008 I've decided this is low priority in my development schedule and I will implement these ideas in future potentially, thanks for your help and suggestions! Quote Link to comment Share on other sites More sharing options...
haku Posted November 16, 2008 Share Posted November 16, 2008 One way around this is to add the content at the very bottom of your page, then position it relatively in the area where you will want it to be. However, this is very difficult if not impossible to get to work. There are a few reasons. First, you will have to leave a space the size of the element for it to be positioned into. So if you have a non-fixed layout it won't work. Also, since you have a footer on your page, you will have to fix the height of the content div, which may not work so well for you. It's an idea you can potentially try to work with, but I'm guessing you probably won't be able to get it work right. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted November 16, 2008 Share Posted November 16, 2008 I'd like to show a "loading content" display for the center-content... also, I'd like the "framework" to load, and then the "content" so my site looks as professional as possible. ~just trying to add a little spark* to my web development. this line states his intention loading the content relitive would not be enough he needs a javascript to delay it with the loading icon he is using Quote Link to comment Share on other sites More sharing options...
bronzemonkey Posted November 16, 2008 Share Posted November 16, 2008 this is totally pointless Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.