Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frameset causes URL to not change in address bar in IE

Status
Not open for further replies.

modfather

MIS
Feb 15, 2000
75
US
Hoping someone can help me out. I have a website that is made up of frames (four, inside my frameset). I notice that when I load the page, my address bar in IE6.0 shows " The problem is: when I navigate to my "links" page, I would expect my address bar to read " but it still just shows " As a result (I think), when I hit the "Refresh" button in IE, it reloads my home page, rather than my "links" page, causing me to go back to my "home" page. Does anyone know why this might be? I am using mostly ColdFusion, but I would assume it doesn't matter....

Any help would guarantee you a spot in the "nice guy/gal hall of fame".

Thanks.
Steve
 
That was one of the "issues" with frames.
In reality you are loading only one page and that's the frameset. from there on the frameset is taking care of what page goes where.
Whenever you hit refresh on the page what you are actually doing is loading the Frameset again in it's original state.

Have you ever tried to navigate a website with frames and once you find something you like you bookmarked just to find out later that you are sent to the homepage again??

that's happening with your site right now. Frames are evil };^)>

grtfercho çB^]\..
"Imagination is more important than Knowledge" A. Einstein
 
Steve,

If you want your address bar to display the URL of the actual page-of-interest (presumably so people can link to them), then chances are good that frames are not really super-helpful for you.

On the other hand, you must have a really good reason for using frames, so maybe you could explain why you think you need to use frames and give us something to redesign from scratch sans frames? [ponder]

Keep us from getting bored, so to speak.

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
Edward,

The only "good" reason I can give you is because a vendor package we have as our ordering part of our site uses frames. Although we didn't have to design the rest of the site with frames...that much is true. It's not that I want the address bar to display the URL of the page (necessarily). I just want people to be able to hit "reload" anywhere on the site and basically just refresh the frameset currently loaded (or a particular frame). The weird thing is: it works fine in Netscape, but our internal browser is IE. :(

If you're interested, the page is:
Thanks.
Steve
 
There is perhaps a way around this #1 reason why frames are evil, however it may well be more effort than it's worth.

You'd need to add an onClick handler to every link on your site, which would write out to a session-based cookie, the URLs of the pages comprising your frameset at that particular time.

Then, in the onLoad handler for the frameset HTML document, you could check for the existence of that cookie, read out the appropriate URLs and assign them to the frames accordingly.
 
That's a good solution for the person viewing the site.

Unfortunately you're still stuck with things like people being unable to send URLs to each other that work ("check out this page").
 
Oooh yeah, that is annoying.

Of course, that the site requires you to log in if you want to do anything from the left column is pretty evil, too. [evil]

This might call for a secret-rebuilding-of-the-website-one-page-at-a-time-offsite...

Cheers,


[monkey] Edward [monkey]

"Cut a hole in the door. Hang a flap. Criminy, why didn't I think of this earlier?!" -- inventor of the cat door
 
The other option that would take care of Genimuse's concern would be to reload the frameset each time, passing the frame URLs as URL parameters to the frameset:

/frameset.html?mainframe=/stuff.html&leftnav=/stuffmenu.html&banner=/stuffbanner.html

It'd be a pain to have to read someone the URL over the phone, but at least you could bookmark it or email it.

Again, probably more trouble than it's worth - but it can be done :)
 
There is more to this problem than meets the eye (initially anyway).

In my experience this is not normal frame behavior. I have several framed sites and in any one of them the refresh refreshes the same frames that were in the frameset immediately prior to the refresh.

I tried your site and this was not the case. However, I also went into view/source (IE6) and saved your frameset html to my desktop as an htm file and the problem went away.



Clive
 
Clive,

Yep, you're exactly right. I found out the solution to the problem just before your reply. My frameset (start page) was "index.cfm". I renamed it to "index.html" and it works perfectly now. The only (minor) problem left is: the address bar doesn't show the full path of where I am on my site. It just shows " no matter where I navigate to on the site. I think it's because my start page is a frameset, because an old site we had DIDN'T use frames throughout most of the site, but when going to the online ordering area, it did use frames (reloaded the page with the frameset). But the address bar continued to work ok...

Hmmm...?

Thanks for your help, though. I really appreciate it.
Steve
 
Steve, That is normal behavior in a frameset. Your frameset is comprised of three separate frames that are all just regular HTML screensets. menu.htm main.htm etc. How could the address bar recognise them all. The address recognises the thing that never changes... the frameset.

This has some advantages as well as disadvantages. It hides query strings for example. It avoids deep-linking which would be important to sites that maybe depend on advertising on their home page.

Anyway glad you solved your problem!

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top