Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Jun 11th, 2007, 1:37 PM   #1
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 kruptof is on a distinguished road
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:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
Old Jun 11th, 2007, 1:40 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Jun 11th, 2007, 1:49 PM   #3
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 333
Rep Power: 3 kruptof is on a distinguished road
Would i have to use ajax to reload the inner text of the the div?
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
Old Jun 11th, 2007, 3:49 PM   #4
ReggaetonKing
Sexy Programmer
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: New Jersey
Posts: 891
Rep Power: 4 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
<!-IN YOUR STYLESHEET-->
.yourname
{
   position: absolute;
}

<!-IN YOUR STYLESHEET-->
<div class="yourname">
STUFF HERE!
</div>
I think that would work.
__________________
I would love to change the world, but they won't give me the source code!
ReggaetonKing is offline   Reply With Quote
Old Jun 11th, 2007, 5:02 PM   #5
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 928
Rep Power: 4 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
@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.)
titaniumdecoy is offline   Reply With Quote
Old Jun 11th, 2007, 5:30 PM   #6
grimpirate
King of Portal
 
grimpirate's Avatar
 
Join Date: Sep 2005
Posts: 439
Rep Power: 4 grimpirate is on a distinguished road
Send a message via Yahoo to grimpirate
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
grimpirate is offline   Reply With Quote
Old Jun 11th, 2007, 5:36 PM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei 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

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




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

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