|
|
#1 (permalink) |
|
New Member
![]() Join Date: Aug 2008
Posts: 23
|
Hello all,
What would be the best way to load content dynamically, where the header and possibly the menu do not have to refresh? Similar to this website. Are there any how-to's on this subject? I've realized I have a lot to learn in web design... |
|
|
|
|
|
#2 (permalink) |
|
New Member
![]() Join Date: Aug 2008
Posts: 8
|
Learn AJAX. You can send information to the server without having to reload a page.
Better yet, if you don't want to go into the details, use the jQuery application. Just include this in your head: Code:
<script type="text/javascript" src="jQueryFile.js"></script> Code:
$.ajax({
url: "newpage.htm",
success: function(html) {
$("#someobject").html = html;
}
});
http://www.jquery.com/
__________________
www.mikeburt.net |
|
|
|
|
|
#3 (permalink) |
|
Moderator
![]() Join Date: Jun 2008
Posts: 365
|
I wouldn't worry about this. On each page have you header etc. your browser will cache images and .css etc. so it won't look like you header is loading each time (I pretty sure this is how this page is structured).
If you start using ajax calls you become less search engine friendly and things like the back button and history won't work properly either. HTH, JC |
|
|
|
|
|
#4 (permalink) |
|
Bronze Member
![]() Join Date: Aug 2008
Location: Dallas, Tx
Posts: 83
|
it's best to reload the menu's and navigation each time. The browser will cache them (as jnjc states above) so there's no worry about lag time there. If you are intent on dynamic page loading, you can use a javascript function to call xmlhttprequest to go get the information from a php (or whatever your scriping language of choice is) page to send the information back to your function.
|
|
|
|
|
|
#6 (permalink) | |
|
Moderator
![]() Join Date: Jun 2008
Posts: 365
|
Quote:
In my mind it makes no sense to use Ajax for what you are trying to achieve... |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|