| View previous topic :: View next topic |
| Author |
Message |
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Mon Nov 17, 2008 9:28 am Header frame links - behaving strangely on different PCs |
|
|
I've just registered on this forum. I need an answer to a puzzling problem with a "frames" site I've just started to create for our local Gardening Allotment Association. I've previously created frames sites with no problems.
It's a simple Header + Mainframe layout. The URL address for the index page is www.aberaeronallotments.org
When originally viewing my work to date in Firefox & IE everything was fine on my main PC. I then noticed on my 2nd machine that the links in the header would open in a new window when viewed in IE on my third machine the site works fine in IE but AFTER CLICKING ON TWO DIFFERENT LINKS IN FF the remaining links would open in a new frame! All three machines use the same versions of IE & Firefox.
I can't for the life of me see how the same browsers on three different machines behave differently. I now notice that on the original machine that I created the website on the FF browser also follows the same pattern as the 3rd PC i.e the first two links work fine (regardless of which links are selected) then from the THIRD link on EVERY link thereafter opens in a new window. On this machine everything works fine in IE!
The only changes I've made to date - with no success is to make sure the "FRAMESET" tags appear before the "BODY" tags.
Any Ideas,
Many Thanks,
Big Gee |
|
|
|
Corey Bryant
Joined: 15 May 2004
Posts: 8428
Location: Castle Pines North, CO USA
|
| Posted: Mon Nov 17, 2008 9:39 am |
|
|
You might try adding the main attribute in you <a> element but it seems you are working to have a membership based website? If so, you should consider using server side includes. This will help maintain the consistency of the website without having the need to change a lot of files. Plus it will help with the search engines when spidering your content and showing the search engine results to users.
_________________
Corey
Virtual Office Solutions | Processing Credit Cards | Microsoft Expression Web Blog |
|
|
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Mon Nov 17, 2008 9:49 am |
|
|
Corey Bryant wrote: You might try adding the main attribute in you <a> element but it seems you are working to have a membership based website?
================================
Thanks Corey,
Can you elaborate regarding the main attribute please? How would this explain the different rendering of the pages in different browsers on different machines?
We're not working to have a membership based site, so there is no need for server side software e.g. a database or PHP scripts etc. The members section is purely a password protected directory that contains pages specifically for members. The "register" & "login" links are purely for members to input their username + password to access information on pages that are only relevant to members.
G. |
|
|
sticks464
Joined: 31 Dec 2006
Posts: 1283
|
| Posted: Mon Nov 17, 2008 10:23 am |
|
|
One of the big reasons it renders differently is IE is in quirks mode. This is due to no doctype being declared.
Frames doctype
Code:
The Frameset DTD should be used for documents with frames. The Frameset DTD is equal to the Transitional DTD except for the frameset element replaces the body element:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
You should remove the target elements here
Code: <frameset framespacing="0" border="0" frameborder="0" rows="206,*">
<frame name="header" scrolling="no" noresize target="main" src="http://aberaeronallotments.org/AAA_header_page.htm" marginwidth="0" marginheight="0">
<frame name="main" src="http://aberaeronallotments.org/AAA_main_page.htm" scrolling="auto" marginwidth="0" marginheight="0" target="_self">
</frameset>
And use target=main on the links in the header frame
Code: <a href="http://aberaeronallotments.org/AAA_main_page.htm">
<img border="0" src="http://aberaeronallotments.org/pics/tab_home.png" width="109" height="26" target="main"></a>
The target element can only be used with a frameset doctype |
|
|
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Mon Nov 17, 2008 11:00 am |
|
|
Thanks sticks464,
I'll chew that bit of coding over when I get a minute. I appreciate what you say about IE being set to "quircks mode" but at the moment, on my main machine, IE is rendering everything as it should HOWEVER Firefox - as I mentioned in an earlier post is working fine for the first two links (in any order) but after that presents the linked pages in a new window!
Could that also be due to the presently included "target elements"?
G. |
|
|
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Mon Nov 17, 2008 12:09 pm |
|
|
sticks464
I've made the changes you recommended. IE now seems to be working OK BUT Firefox still insists on opening the links up in a new page instead of the "main" frame after clicking on more than ONE link (used to be 2). The first link opens correctly in the "main" frame (regardless of which link is chosen) but when a second link is selected it then opens in a new window until the browser is closed down & reopened. Then, again, the first link opens correctly but from then on all links open as a new page :shock: :?:
Am I missing something here? |
|
|
sticks464
Joined: 31 Dec 2006
Posts: 1283
|
| Posted: Mon Nov 17, 2008 2:00 pm |
|
|
Code: Need a space between elements
height="26"target="main"
height="26" target="main"
Your frame defination page should look like this
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<head>
<title>Page title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
p {
font-family: Arial, Verdana, Helvetica, sans-serif;
color: #006600;
}
</style>
</head>
<frameset rows="206,*">
<frame src="http://aberaeronallotments.org/AAA_header_page.htm" scrolling="no" marginheight="0" marginwidth="0" noresize="noresize" name="header">
<frame src="http://aberaeronallotments.org/AAA_main_page.htm" marginheight="0" scrolling="auto" marginwidth="0" marginheight="0" name="main">
</frameset>
<noframes>
<body>
<p>This web-page uses frames, but your
browser doesn't seem to support them. Please upgrade your browser to a
version that supports Frames to view the site.<br><br>
Thanks,<br><br>
Aberaeron Allotment Association Webmaster.</p>
</body>
</noframes>
</html>
Your html pages should have this format
Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
</body>
</html> |
|
|
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Mon Nov 17, 2008 11:15 pm |
|
|
Thank you very much indeed sticks464 - I'll give this a go either tonight or tomorrow morning (it's now 7.05am in the UK and I'm about to leave & won't be back until late tonight).
As soon as I make the changes & try them out I'll get back to you.
I can see some of the changes to the coding I've used - fingers crossed it'll crack the problem.
I'm impressed with the effort you've gone to with this - it really is very kind of you.
Once again _ MANY THANKS!
G. |
|
|
BigGee
Joined: 17 Nov 2008
Posts: 7
Location: wales in the UK
|
| Posted: Wed Nov 19, 2008 6:26 am |
|
|
Hi sticks464 -
I've followed your instructions, but STILL Firefox insists on opening in new windows! IE seems OK. The strange thing is FF behaves fine for the first two links (opening the target pages in the main frame) however when a third link is chosen on the Header page (regardless of which links they are) it then opens all further links as new pages!
Do you want me to send you the HTML code for the Frameset (Index) page + the Header page - to see if you can see where the bug is?
If you send me an e-mail to the address gwilymatsccambria.com I'll send you a text file containing the code as it currently is for these pages.
Sorry to be a pain, but this is really frustrating, and although the majority of visitors will not be affected (as they use IE) it's still not acceptable to have viewers who use Fiorefox experience this problem.I haven't had this problem in the past and I'm starting to wonder if it's associated with any changes implemented in the latest upgrade of the FF browser.
Thanks,
G. |
|
|
| |