jmrothermel Posted January 31, 2008 Share Posted January 31, 2008 I have a question. I have my site framed in the sense includes header and footer. But I want to know if there is an easy way to make the URL of the pages not change. I always want it to reflect the home page so people dont bookmark certain pages. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/ Share on other sites More sharing options...
MadnessRed Posted January 31, 2008 Share Posted January 31, 2008 yes there are several way. the easiest way would be to create a new page with the code <HTML> <HEAD> <TITLE>##Your Website##</TITLE> </HEAD> <FRAMESET cols="100%"> <FRAMESET rows="100%"> <FRAME src="index2.html"> </FRAMESET> </FRAMESET> </HTML> And you would need to make that file the index.html / php file.. Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-454779 Share on other sites More sharing options...
MadnessRed Posted February 1, 2008 Share Posted February 1, 2008 appologies for double posting but another way which is what i used for a while is to change the target field. So if you main frame is called body then you can change the target field. <a href="games.html" target="body">Games</a> This would then load games.html into the body frame but the html would be kept the same. <FRAMESET COLS="25%,75%"> <FRAME NAME="Links" SRC="links.html"> <FRAME NAME="Body" SRC="home.html"> </FRAMESET> so put that in the index.html file. Then you need a links.html file in which the target is "Body" I hope this makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-454874 Share on other sites More sharing options...
haku Posted February 1, 2008 Share Posted February 1, 2008 Frames is really bad practice. So 2001. You can do this using ajax. But you will need to be pretty good with javascript. You could also do it with flash, but you will need to make your whole site in flash. Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-454915 Share on other sites More sharing options...
MadnessRed Posted February 1, 2008 Share Posted February 1, 2008 if his site is already in frame though it wont hurt him to do this in frame too. I used frames because that way I could have the menu as 1 file but them I found that I can do this much easier wit the php include function. Though I don't know if it work work but just make new site <?php include("index.html"); ?> and change nothing else. The php file will load first and then the links should change in the include i think. I dunno if this will work but its worth a try Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-455439 Share on other sites More sharing options...
nafetski Posted February 1, 2008 Share Posted February 1, 2008 While frames are an old technology, there are times when using them is still permissible - and you can still have some really great looking sites. Old school scrollable frames are 2001, but using one to hide the url really doesn't change your page layout or design at all. (which, lets face it - the end user won't know a difference anyway) Ajax is great, and I use it in almost all of our applications...however, building an entire site navigation of Ajax can sometimes drive you to a sensation where your brain is melting. Keeping track of all of your include files, what divs are being populated, retrieving form content...it can all feel very un-natural. With a few of the all-ajax sites I've done..when I look back at my code I have no idea what is going on, and it feels as if some voodoo-witch doctor is making the page function instead of any existing web technologies. However, if you want to take a peek at Ajax (I'd reccomend anybody to at least get familiar) here is a great tutorial to start you off. http://www.tizag.com/ajaxTutorial/ Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-455600 Share on other sites More sharing options...
MadnessRed Posted February 2, 2008 Share Posted February 2, 2008 ok appoliges then, but i saw he was already using frames so didn't see how using any more would be a bad thing. Quote Link to comment https://forums.phpfreaks.com/topic/88795-making-url-not-change/#findComment-456202 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.