Results 1 to 6 of 6

Thread: Frames and FavIcon

  1. #1
    Join Date
    Mar 2007
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Frames and FavIcon

    First of all, thanks for a great website.

    As I do my own web maintenance when not working, I tried the favicon on one of my pages. I have a lead-in page directing to two sub-domains via two logos. The favicon came up relatively quick in IE7 after a couple of F5's (refresh).

    On one of the sub domains, I am still using frames with the revised slashdot menu on the left and in the main page a modified version of the thick tabs menu.

    I have two questions. (actually only one now, figured out the 2nd one)

    1.
    When using frames, the title bar refers to index.htm as the page even after selecting a different page from within the main page. Each of these pages have their own titles but are never displayed in a tab or title bar.

    Is there at least a way to update the tab viz. "URL Name" - "Current Page" by using the info in <title>Whatever</title>?

    1.1
    With the address bar referring to url/index.htm when refreshing with the mouse focus in either frame, the current page is refreshed and also if the refresh button is used. However, when the focus goes back to the address bar and pressing enter, the default page is loaded. I know this is a result of the way frames work. As a creature of habit, I try to keep the content of my pages limited to a maximum of one rotation of the scroll wheel (2 screen heights) so I am reluctant to rewrite without frames.

    Any suggestions will be appreciated.

    Lead-in page http://www.lbk.co.za
    Frames page http://www.lbk.co.za/Const

    2.
    On the same page, I included the favicon in the left frame but no appearance of the favicon.

    NOTE I just realised, that with frames there is a main page main.htm and I tried including

    <link rel="bookmark" href="http://url/favicon.ico">
    <link rel="shortcut icon" href="http://url/favicon.ico">
    in this page and the favicon appeared immediately after deleting the cache.

    So question 2. is answered, just thought I'd leave it in the post for similar problems others may be having in this regard


    Bernie

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I don't even understand the point of question 1.1. I see you've answered question 2 yourself. There is no way, using just HTML to answer question 1. And, if your frameset has more than one frame in it that changes, you would have to choose which frame's title would be promoted. But, javascript may be able to help out. On the pages that you want to behave this way, you could have a script below the title (untested):

    Code:
    <title>LBK Construction (Contact Details)</title>
    <script type="text/javascript">
    parent.document.title=document.title;
    </script>
    Or something like that.
    Last edited by jscheuer1; 04-19-2007 at 08:20 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    I'm pretty sure that you can't make the frame address and title to show up in the parent window; that's basically the whole point of frames. If you need the link inside the frame to open in the parent window, use _parent as the a target.
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by techno_race View Post
    I'm pretty sure that you can't make the frame address and title to show up in the parent window
    The address, no - not without some server-side gymnastics and maybe not even then. However, I just tried out my little script-let and it works just fine for the title. I imagine there may be problems if the frameset page were on a different domain than the en-framed page but, this doesn't seem to be at issue here.

    Notes: The title also changes the text shown in the tab, if tabs are enabled. Of course, with javascript disabled this will not work but, that would be relatively few people and, the title of the frameset would simply remain. If that title is appropriate to the other (en-framed) content as is the case with this situation, it would still be OK in javascript disabled browsers, just not optimal.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2007
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks John

    The scriptlet works fine and is exactly what I needed.

    As for

    However, when the focus goes back to the address bar and pressing enter, the default page is loaded.
    I can live with this as it is unlikely a user would set the focus to the address bar and merely press enter.

    Just a note to others, the title in the tabs is cache dependant, so clear the cache or refresh a couple of times to see the results.

    A qustion on Favicon.

    It does not work on a local machine. Is this as a result of some www service etc. needing to be enabled on the local machine? Just curious, would be nice to test locally before uploading.

    Bernie

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by bernie View Post
    A qustion on Favicon.

    It does not work on a local machine. Is this as a result of some www service etc. needing to be enabled on the local machine? Just curious, would be nice to test locally before uploading.
    That's pretty much the issue. If you had an intranet, you could test it out there. Also, you could try the absolute local path to the favicon in a:

    HTML Code:
    <link rel="shortcut icon" href="http://url/favicon.ico">
    tag, then some browsers may show it, example of an absolute local path:

    HTML Code:
    <link rel="shortcut icon" href="file://localhost/C:/webstuff/test/favicon.ico">
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •