SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Texas
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Using Frames Properly, For Web Applications

    As a college student who rarely carries around his computer, I find great value in web applications like google calendar and backpackit. I recently decided that instead of pulling up each application on our school's large monitors, I would create a page on my servers with 2 or 3 frames, each with a different application (the results thusfar are here: http://my.bluevolume.com).

    I'm not sure if its a browser issue, a google issue, or a doctype issue, but the whole thing is very unstable. Backpackit ususally has no problem loading up, sometimes the google calendar login comes up but won't work once you log in, and sometimes it doesn't work at all, and the presonalized google home on the bottom row just doesn't work at all. These results are also just in Safari; in most other browsers it just doesn't work at all.

    Any ideas as to what is causing these issues?

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All I get is a blank page when I access that page. Also a quick search will show many arguments against using frames.

  3. #3
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Texas
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All I get is a blank page when I access that page.
    Exactly - that's my problem. With frames I should be able to load all three pages in there.

    Also a quick search will show many arguments against using frames.
    For normal websites, yes, but not for my purposes. Unless there's some other function that can load three different websites in one page more efficiently (javascript maybe?), frames are the best option.

  4. #4
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could always use an iframe. Still an issue with bookmarking but.. you have somewhat more flexibility over placement and css and what not.

  5. #5
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Full frames generally share cookies NOT with the site they are displaying, but with the parent frame... as such anything like login cookies are flat out not going to work.

    On top of which most browsers won't display in a frame content from a different domain anymore if you use XHTML (strict or transitional)- it was too easy to make a fullscreen frame to 'hijack' the browser for datamining without the user knowing they are in a frame... Which I suspect is probably part of why Google hasn't gone out of their way to adopt web standards yet, it would break google image search.

    Wierd thing is, sometimes it works, sometimes it doesnt... There are two things I'd try...

    revert to old school html... lose the doctype and the xmlns= ... and probably kill off these two lines too

    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />

    just to be sure.

    The google image search does pretty much what you are trying to do, so I'd use it's 'template' as a baseline.

    The second idea I had is that instead of using regular frames, perhaps the iframe would work better. Back when one of my sites was on a different domain (and server) than it's forums, I loaded a dummy file in an iframe off the forums, so I could access the forum cookies and run SQL queries on the forums server, from the website - without having the two servers actually talk to each-other directly.

    Basically, while iframes and frames are SUPPOSED to be functionally identical, I've found iframes a bit more... predictable. It's worth a shot.

    It was stupid, but it worked... Which if it worked, well, it wasn't all that stupid.

  6. #6
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Texas
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your time. I tried both of your methods (removing the head stuff and doctype and using iframes), and it just seems like google's unwillingness to work with frames is what's causing the issue. Are there any non-frame solutions to this issue - maybe something along the lines of javascript?

  7. #7
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just took a stab at such a thing myself - and got it to work!

    The problem wasn't what I thought at all - you put your frames inside the body tag - body should go inside the <noframe> tag.

    Once you open the body, you set the 'master' property for all frames under that document object under it. If you never open a body on a frameset, it works fine. (I USED to actually know this!)

    so this works:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Frame Tester</title>
    </head>
    
    <frameset cols="35%,*">
      <frame name="backPackIt" src="http://justpw.backpackit.com" title="Just Backpack it" />
      <frameset rows="75%,*">
        <frame name="googleCalendar" src="http://www.google.com/calendar" title="Google Calendar" />
        <frame name="googleIg" src="http://www.google.com/ig" title="Google Ig" />
      </frameset>
      <noframes>
        <body>
          <p>Your browser knows not the frame.</p>
        </body>
      </noframes>
    </frameset>
    
    </html>

  8. #8
    SitePoint Member
    Join Date
    Apr 2004
    Location
    Texas
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good job! It works perfectly on my computer, though I think google and it's cookies still have some issues with it if you arn't already logged in (which kind of defeats the purpose if you have to log in to every page beforehand). I'm guessing there's no way around that one?

    Edit:

    actually I just tested it again on their computers and it works great! Thanks!
    Last edited by orangpaper; Jul 11, 2006 at 17:34.


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
  •