![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
Alternative to Frames
I need to have a static menu bar (as it doesn't need to be reloaded), I’m trying to avoid using frames due to all the bad press they receive, so does anybody know an alternative to frames in this situation.
__________________
Quote:
|
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
A div.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 | |
|
Professional Programmer
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3
![]() |
Would i have to use ajax to reload the inner text of the the div?
__________________
Quote:
|
|
|
|
|
|
|
#4 |
|
Sexy Programmer
|
<!-IN YOUR STYLESHEET-->
.yourname
{
position: absolute;
}
<!-IN YOUR STYLESHEET-->
<div class="yourname">
STUFF HERE!
</div>
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
|
|
#5 |
|
Expert Programmer
|
@reggaeton_king: That won't prevent the menu bar from being reloaded when the user loads a new page.
Using frames would certainly be the easiest way to accomplish your goal. I don't think there is an easy alternative. I believe it is possible to use Ajax as you suggest, but it will probably be difficult to implement. (I don't know much about Ajax so hopefully someone with more experience in this area will elaborate.) |
|
|
|
|
|
#6 |
|
King of Portal
|
I think if you need to have a static menu as DaWei said you just need to place static content on the HTML, as that's how HTML works. If you mean you don't want it to reload itself then your best bet would be frames. The other option would be to make the entirety of the rest of the page with javascript and that it would change based on the static div menu presses.
__________________
Lo, there do I see my father. 'Lo, there do I see My mother, and my sisters, and my brothers. 'Lo, there do I see The line of my people... Back to the beginning. 'Lo, they do call to me. They bid me take my place among them. In the halls of Valhalla... Where the brave... May live... ...forever.. GrimBB | Mimesis |
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Frames aren't inherently evil, they're just abused. For instance, someone may put a link to your site, then when it's clicked, shove YOUR site inside THEIR frame. That's about as rude as some site resizing your browser window for you, slamming it somewhere else on the screen, and changing the text size for you.
The hardest thing about asynchronous transfers (AJAX ) is not in using it, but in listening to all the hype about it without puking. If you recall my tic-tac-toe game, the moves were transferred using asynchronous requests. The same is true of the PFO Members Map that I did. Who wants to refresh the whole dam' board, controls and all, when 95% of it doesn't change?You just make an asynchronous request object (one way for IE and another way for other browsers), make your request, get your response, and put it where you want it. You can use innerHTML (not recommended by W3C) or the W3C's method for changing content. If you're changing virtually all the page, except for the menu bar, why are you worried about just reloading that tiny part along with the rest? If you're not changing the menu at all, then you probably aren't letting the viewer know where they are, in relation to the site, unless you're using breadcrumbs. Look at one of the articles in my signature. The whole page is changed for each section, including the menu. So much is changing on the page that the menu change is insignificant. If the change were minor, I'd use an asynchronous request. There are about a thousand zillion tutorials on the web. A lot of them are even sensible.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| FireFox, JScript, Frames, and Relative URLs | flignar | JavaScript and Client-Side Browser Scripting | 1 | Jun 10th, 2007 5:06 AM |
| Linkable Frames | PhilBon | Other Web Development Languages | 2 | Feb 23rd, 2007 8:10 PM |
| internal frames | dsbabyGurl | Java | 0 | Oct 30th, 2006 2:23 AM |
| Frames --> use or not? | Brokenkingpin | HTML / XHTML / CSS | 26 | Nov 2nd, 2005 12:41 PM |
| I need help with Frames | crawforddavid2006 | HTML / XHTML / CSS | 3 | Jun 20th, 2005 2:01 AM |