Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 10th, 2006, 5:19 PM   #1
Sungam
Newbie
 
Join Date: Dec 2005
Posts: 15
Rep Power: 0 Sungam is on a distinguished road
How to make common navigation not reload.

I don't know a lot about Server Side scripting, or using C/perl in CGI as opposed to using PHP or ASP for this kind of thing. Which one should I learn, to make the navigation not have to reload when you click on a link to go to a different section of the website?
Sungam is offline   Reply With Quote
Old Jan 11th, 2006, 7:33 PM   #2
Sungam
Newbie
 
Join Date: Dec 2005
Posts: 15
Rep Power: 0 Sungam is on a distinguished road
I hope that you guys aren't intimidated by my question. I don't want you to tell me exactly how to do this, I just need someone to help point me in the right direction.
Sungam is offline   Reply With Quote
Old Jan 11th, 2006, 7:55 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
Oh I know what you mean. Like those sites where it's a stationary template, and then the content inside the middle section is the only part that loads when you click a link.

I don't know how to do this, but I suppose it is something to do with cgi or excrutiating javascript. Most people don't worry about those kind of layouts though, since it doesn't really change anything perhaps the feasability of making quick changes.

Sorry I couldn't be of much help. =\
Sane is offline   Reply With Quote
Old Jan 11th, 2006, 8:04 PM   #4
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 630
Rep Power: 4 Jessehk is on a distinguished road
Now, this is a complete guess, because I have done very, very limited html.
I believe that when using frames, one part of the site can update, while another stays the same.
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Jan 11th, 2006, 8:43 PM   #5
Sungam
Newbie
 
Join Date: Dec 2005
Posts: 15
Rep Power: 0 Sungam is on a distinguished road
yeah, that is the easy way, to use frames. But then all sorts of things go wrong when you try to print, bookmark a page, or if you want to exit the frameset.
Sungam is offline   Reply With Quote
Old Jan 12th, 2006, 1:43 AM   #6
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 3 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Most sites use evil frames for that. I'm sure there are some other ways around it though.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Jan 12th, 2006, 2:56 AM   #7
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
PHP is easy enough to include common files:
[php]<?php include "yourfile.html"; ?>[/php]Just place that tag in your html files. Rename them to .php, and that tag will be replaced with the file you want to include (assuming your server supports PHP).
Arevos is offline   Reply With Quote
Old Jan 12th, 2006, 7:59 AM   #8
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 3 Polyphemus_ is on a distinguished road
Frames were used in the time Internet and computers were slow... a browser had only to load a part of the page, instead of the whole page. Today, using frames is considered as a bad havit. With PHP, you can dump the navigation, header etc., and place the content code in the actual file. It will be something like this then:

header.php:
<html>
<head><title> ... etc (Place header + the navigation over here)

<?php
function footer() {
?>
(Place code for the footer over here)
</body>
</html>
<?php
}
?>

some_page.php:
<?php
include("header.php")
?>

Content over here

<?php
footer();
?>
Polyphemus_ is offline   Reply With Quote
Old Jan 12th, 2006, 2:20 PM   #9
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
If you want to only reload part of the page, like in Google's Gmail, Maps, etc. you should check out AJAX. It stands for Asynchronous JavaScript And XML, and is used to download data silently and refresh only the part of the page that needs changing - exactly what you want. As a plus, it also means you can offload a lot of the processing onto the client. It does mean they need JavaScript enabled though, and many people don't for security reasons.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Jan 12th, 2006, 5:32 PM   #10
Sungam
Newbie
 
Join Date: Dec 2005
Posts: 15
Rep Power: 0 Sungam is on a distinguished road
Thanks for the suggestion, but I think I am going to be looking to more server side ways, because I don't want my website to me relianent upon the clients computer. Google has an advanage because it is offering something that people will really want to use, rather than my personal website, which will be promoting me as a composer.

I knew PHP would work, but it seems like it is just doing something more complex for me behind the curtian so to speak. I would like to do it myself, if that is the case. I was assumming some kind of python or C scripting could do this as well.
Sungam is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC