943,708 Members | Top Members by Rank

Ad:
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Dec 1st, 2008
0

Re: Frames and Framesets or ???

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.
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008
Dec 1st, 2008
0

Re: Frames and Framesets or ???

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.
Reputation Points: 31
Solved Threads: 10
Practically a Master Poster
OmniX is offline Offline
652 posts
since Dec 2007
Dec 2nd, 2008
1

Re: Frames and Framesets or ???

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()">:

JavaScript Syntax (Toggle Plain Text)
  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.
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008
Dec 3rd, 2008
0

Re: Frames and Framesets or ???

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.
Reputation Points: 31
Solved Threads: 10
Practically a Master Poster
OmniX is offline Offline
652 posts
since Dec 2007
Dec 4th, 2008
0

Re: Frames and Framesets or ???

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.
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008
Dec 4th, 2008
0

Re: Frames and Framesets or ???

Click to Expand / Collapse  Quote originally posted by ingeva ...
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!
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008
Dec 8th, 2008
0

Re: Frames and Framesets or ???

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
Reputation Points: 31
Solved Threads: 10
Practically a Master Poster
OmniX is offline Offline
652 posts
since Dec 2007
Dec 8th, 2008
0

Re: Frames and Framesets or ???

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?
Reputation Points: 31
Solved Threads: 10
Practically a Master Poster
OmniX is offline Offline
652 posts
since Dec 2007
Dec 8th, 2008
0

Re: Frames and Framesets or ???

Click to Expand / Collapse  Quote originally posted by OmniX ...
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!
Reputation Points: 16
Solved Threads: 9
Junior Poster
ingeva is offline Offline
106 posts
since Jul 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Plan for parsing HTML
Next Thread in HTML and CSS Forum Timeline: preview edit letter - div or iframe





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC