menuse - yet another problem.

P

Prophet

Ok, so I have a vertical expanding menu on my left column. I am using
frames and the left column is not wide enough for my submenu.

Is it possible to bring the sub menu across the boarders of frames??
 
D

David Dorward

Prophet said:
Ok, so I have a vertical expanding menu on my left column. I am using
frames

Oh dear. http://allmyfaqs.net/faq.pl?Problems_with_using_frames
and the left column is not wide enough for my submenu.

Is it possible to bring the sub menu across the boarders of frames??

Well - you could duplicate the entire element in the other document and
carefully position it so it lines up - but it almost certainly isn't worth
it.
 
P

Prophet

David Dorward said:
Oh dear. http://allmyfaqs.net/faq.pl?Problems_with_using_frames


Well - you could duplicate the entire element in the other document and
carefully position it so it lines up - but it almost certainly isn't worth
it.


The reason I used a frames was that I wanted to have the menu constant and
only have to change one page rather than the 50 or so pages that the menu
brings up every time I ad something to the menu.

Is there a better way????
 
S

spivee

I think there are a couple of solutions to your problem. I'm no expert
by any stretch of the imagnation, but I've asked enough questions here
that I think I should at least try to pitch in.

You might be able to use some kind of ajax functionality to load the
page contents while not having to reload the rest of the page. The
basics are really quite simple and you can find several tutorials
online. Basically, when somebody clicked on one of your links, your
XMLHttpRequest object could send that request to the webserver and
populate the main page content element with the new content. This
would keep you from having to reload the menu for each page.

You could also, possibly, save the menu object into the session object
and then just print it out on each page. You'd want to do a check to
make sure the menu exists on each paint though and create it if it
doesn't exist.

Really though, unless your menu is extensive, I'd suspect that just
rewriting the menu every time the page is loaded wouldn't cause
extensive performance issues.

Like I said, I'm no expert, just thought I'd chip in my .02¢.
 
P

Prophet

I think there are a couple of solutions to your problem. I'm no expert
by any stretch of the imagnation, but I've asked enough questions here
that I think I should at least try to pitch in.

You might be able to use some kind of ajax functionality to load the
page contents while not having to reload the rest of the page. The
basics are really quite simple and you can find several tutorials
online. Basically, when somebody clicked on one of your links, your
XMLHttpRequest object could send that request to the webserver and
populate the main page content element with the new content. This
would keep you from having to reload the menu for each page.

You could also, possibly, save the menu object into the session object
and then just print it out on each page. You'd want to do a check to
make sure the menu exists on each paint though and create it if it
doesn't exist.

Really though, unless your menu is extensive, I'd suspect that just
rewriting the menu every time the page is loaded wouldn't cause
extensive performance issues.

Like I said, I'm no expert, just thought I'd chip in my .02¢.


I was not to worried about operating time - just the time to copy the menu
to all of the pages so that I do not have to use frames - especially since I
am adding new items to the menu on a continual basis.

I will look at the Ajax programming as I know nothing about it.
 
D

David Dorward

The reason I used a frames was that I wanted to have the menu constant and
only have to change one page rather than the 50 or so pages that the menu
brings up every time I ad something to the menu.

Is there a better way????

Yes. See the URL I referenced previously. It has a nice section labeled
"What are the alternatives to using frames?".
 
W

web.dev

Prophet said:
The reason I used a frames was that I wanted to have the menu constant and
only have to change one page rather than the 50 or so pages that the menu
brings up every time I ad something to the menu.

Is there a better way????

The URL given to you by David should help you with that problem. Use
SSI (server side includes) to include one file across many pages. When
you make a change to a single file, the change will be seen across all
pages that have included it.
 
W

web.dev

You might be able to use some kind of ajax functionality to load the
page contents while not having to reload the rest of the page. The
basics are really quite simple and you can find several tutorials
online. Basically, when somebody clicked on one of your links, your
XMLHttpRequest object could send that request to the webserver and
populate the main page content element with the new content. This
would keep you from having to reload the menu for each page.

Your solution could work, however what would you do for a user that has
javascript disabled? Site navigation becomes broken. You could
attempt to do graceful degradation, but this can become really messy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top