| | |
Frames and Framesets or ???
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2008
Posts: 101
Reputation:
Solved Threads: 9
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.
By removing frames altogether you'll save yourself from a lot of cumbersome maintenance work later.
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!!!
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
•
•
Join Date: Jul 2008
Posts: 101
Reputation:
Solved Threads: 9
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()">:
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.
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()">:
JavaScript Syntax (Toggle Plain Text)
<script type="text/javascript"> var H, W, B4=false; function once() // Executed only once. { if (B4) return; B4 = true; window.onresize=resize; resize(); } // Match body font to size of window. // Percent of width: Define the size of "1.0em" function resize() // Set font relative to window width. { if (window.innerWidth) W = window.innerWidth; else W = document.body.clientWidth; P = Math.floor (W/33); // ca. 3 percent constant if (P<12)P=12; // Smallest size. document.body.style.fontSize=P + "px"; document.body.style.visibility="visible"; // Make sure it can be seen. } </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.
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
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
•
•
Join Date: Jul 2008
Posts: 101
Reputation:
Solved Threads: 9
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?
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.
•
•
Join Date: Jul 2008
Posts: 101
Reputation:
Solved Threads: 9
•
•
•
•
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?
I'm not used to this forum. It does things a little differently
from what I'm used to!
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
.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
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?
Any ideas?
What do you call the affect I am trying to get?
Maybe I can google it?
"You never stop learning." - OmniX
•
•
Join Date: Jul 2008
Posts: 101
Reputation:
Solved Threads: 9
•
•
•
•
What do you call the affect I am trying to get?
Maybe I can google it?
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!
![]() |
Similar Threads
- Using Framesets (ASP.NET)
- Site design problem (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Plan for parsing HTML
- Next Thread: preview edit letter - div or iframe
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7





