- Apr 9, 2009
- 7,318
- 4
- 76
I'm really having a hard time maintaining one of my pages that has a couple of frames on it (top, left nav and main), and I'm looking to replace them with something a little easier to modify, and simpler to achieve the style I want. I've read about the following alternatives:
iframes
server side or php includes
javascript
I don't want the js requirement, and I'd like to avoid iframes so that leaves me with the option of server side or php includes. I have PHP 5 running, so I'd like to take advantage of this, but I'm not sure if it is the easiest to maintain.
Basically it's a simple page that will have a nav bar along the left with dynamically assigned links. I already have this part working in frames, but I guess I'll need to update it to work as an include.
I'm just looking for something to cleanly update the main part of the page when a link is clicked, and let the link stay highlighted in the left frame. The way I have it now, I'm using CSS's active and focus styles, but when the user clicks on a link in the frame (or anywhere on the page), the highlight removes itself, since the left frame no longer knows which page they are on. I think as a workaround I could reload the left frame and pass the main page name each time a link is clicked, but it seems without frames this might be a lot easier to manage.
Overall this should be simple to set up, I'm just wondering if anyone has any preference to server side or php includes, or if either has an advantage. They seem very similar to me, but I've never used them so I could be overlooking something.
Thanks!
iframes
server side or php includes
javascript
I don't want the js requirement, and I'd like to avoid iframes so that leaves me with the option of server side or php includes. I have PHP 5 running, so I'd like to take advantage of this, but I'm not sure if it is the easiest to maintain.
Basically it's a simple page that will have a nav bar along the left with dynamically assigned links. I already have this part working in frames, but I guess I'll need to update it to work as an include.
I'm just looking for something to cleanly update the main part of the page when a link is clicked, and let the link stay highlighted in the left frame. The way I have it now, I'm using CSS's active and focus styles, but when the user clicks on a link in the frame (or anywhere on the page), the highlight removes itself, since the left frame no longer knows which page they are on. I think as a workaround I could reload the left frame and pass the main page name each time a link is clicked, but it seems without frames this might be a lot easier to manage.
Overall this should be simple to set up, I'm just wondering if anyone has any preference to server side or php includes, or if either has an advantage. They seem very similar to me, but I've never used them so I could be overlooking something.
Thanks!
Last edited:
