Frames and Framesets or ???

Thread Solved

Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: Frames and Framesets or ???

 
0
  #11
Dec 1st, 2008
I don't think you can replace frames, but you can change your way of thinking. Frames do have some advantages, but they are responsible for maintaining oldfashioned constructs. As mentioned before, a truly interactive web page can probably only be achieved with AJAX since that allows you to change only the changed part of a page, but you might be surprised by seeing what caching actually does for you. If the most part of a page is unchanged, it will be taken from the cache instead of from the net, thereby achieving what you want to, but in a better way.

By removing frames altogether you'll save yourself from a lot of cumbersome maintenance work later.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 609
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Frames and Framesets or ???

 
0
  #12
Dec 1st, 2008
Heres a few examples of what I would like to accomplish:
http://www.greenhamnaturalbeef.com.au/
http://www.quincy.com.au/

How have this been accomplished frames, ajax, ???
Because I very much doubt they incorporate ajax?
Yet they have backgrounds that are stunning!!!
Last edited by OmniX; Dec 1st, 2008 at 8:20 pm.
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: Frames and Framesets or ???

 
1
  #13
Dec 2nd, 2008
I can imagine one good use of frames, but I'm afraid it would be somewhat dependent on the browser in use. Standard solutions however, should not be.

I understand your request for a solution where you don't have to download the whole page every time someone clicks a menu entry, but there's really no need. Caching will make sure that most or all unchanged content will not be downloaded again.

If you insist on this, I would make a compromise: Let one frame be completely hidden, and load changed elements into it before copying them to their destination by assigning it using InnerHTML.
Thus you can load only one div at the time if you wish, or actually any single object which has an ID. This takes some work and knowledge of JavaScript and the DOM. It's not really hard however; I did that several years ago when I was just learning JavaScript.

I think this could be done even more elegant with AJAX however, because it would allow you to scrap the frames altogether.
Every hour you spend on learning these things will pay you back with interest. It takes some work and a lot of dedication, but you could end up being a real guru!

For my own sites I have to a large extent gotten rid of this "elegance" and I use mostly php for the "heavy" work. That way most of the contents of the website must be reloaded for every change, but the speed is so fast you would seldom notice that there has been a change at all, except it you watch and observe the contents changing.

A simple function for modifying the sizes of all "em" sizes elements
here: Use <body onload="once()">:

  1. <script type="text/javascript">
  2. var H, W, B4=false;
  3.  
  4. function once() // Executed only once.
  5. { if (B4) return;
  6. B4 = true;
  7. window.onresize=resize;
  8. resize();
  9. }
  10.  
  11. // Match body font to size of window.
  12. // Percent of width: Define the size of "1.0em"
  13.  
  14. function resize() // Set font relative to window width.
  15. { if (window.innerWidth)
  16. W = window.innerWidth;
  17. else
  18. W = document.body.clientWidth;
  19. P = Math.floor (W/33); // ca. 3 percent constant
  20. if (P<12)P=12; // Smallest size.
  21. document.body.style.fontSize=P + "px";
  22. document.body.style.visibility="visible"; // Make sure it can be seen.
  23. }
  24. </script>

The "innerHTML" element is used in a similar fashion to modify contents. You can use visibility to switch visibility on/off.

Oh; a last comment: The pages you used as examples are so excruciatingly slow that I'm really wondering why they bothered with this (framed? Haven't looked at the code) system in the first place. I'm convinced that they both would have been smoother and faster using a more modern, standard solution.
Last edited by peter_budo; Dec 3rd, 2008 at 7:38 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 609
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Frames and Framesets or ???

 
0
  #14
Dec 3rd, 2008
So your telling me just to copy and paste my frame and menu code in every webpage and just change the content?

But if I wish to not reuse code then use use ur solution to reload, that correct?

PS: I have a cold and my decision making isnt the best at the moment, so sorry if I seem lost
Last edited by OmniX; Dec 3rd, 2008 at 9:51 pm.
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: Frames and Framesets or ???

 
0
  #15
Dec 4th, 2008
I don't know how you have organized things, but menues can be handled very elegantly with JavaScript and/or CSS. The latter is often preferred so you really have to study what CSS can do. It's amazing!

I would also suggest that you look into what you can do with php on the server side. If you don't do php programming I can't help you much. It's one of the clues (NOT the only one!) to better, faster and more efficient web programming.

I lost my previous post. Couln't find it again when I wanted to do some editing. Now I found it again because I received a notice. Are there two different threads on the same subject?
Last edited by ingeva; Dec 4th, 2008 at 4:46 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: Frames and Framesets or ???

 
0
  #16
Dec 4th, 2008
Originally Posted by ingeva View Post
I lost my previous post. Couln't find it again when I wanted to do some editing. Now I found it again because I received a notice. Are there two different threads on the same subject?
Hehe, sorry about that. There were more "pages".
I'm not used to this forum. It does things a little differently
from what I'm used to!
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 609
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Frames and Framesets or ???

 
0
  #17
Dec 8th, 2008
ingeva thanks for all your insight so much, I have been sick and also havent had any thread notifcations still .

So I will take in your input and hopefully put it to good use

If anymore info you can suggest be much appreciated in the mean time ill get started on my project with your suggestions.

Thankyou so much for your help
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 609
Reputation: OmniX is an unknown quantity at this point 
Solved Threads: 8
OmniX's Avatar
OmniX OmniX is offline Offline
Practically a Master Poster

Re: Frames and Framesets or ???

 
0
  #18
Dec 8th, 2008
I have been tolling around with the use of the divs tags like you told me but they still refuse to work on both firefox and internet explorer havent tried on others (they work on one not the other).

Any ideas?

What do you call the affect I am trying to get?

Maybe I can google it?
"You never stop learning." - OmniX
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 101
Reputation: ingeva is an unknown quantity at this point 
Solved Threads: 9
ingeva ingeva is offline Offline
Junior Poster

Re: Frames and Framesets or ???

 
0
  #19
Dec 8th, 2008
Originally Posted by OmniX View Post
What do you call the affect I am trying to get?

Maybe I can google it?
I have no good name for it. A JavaScript, and particularly AJAX expert might have a very nice solution for you but since you're not that (And I certainly am not!) I think that either you should leave the idea or find someone who could help you do the programming,
because I think it costs more than you'll gain.
Personally I like to do such programming myself because I learn a lot from it, and I can maintain the site myself. Plus, and that's no disadvantage, I can define functions that I can use generally, and not only for one site. I have a small library of those!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC