HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
iframes - targeting multiple anchors in one document
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Thu Sep 15, 2005 3:04 pm     iframes - targeting multiple anchors in one document Reply with quote

The site I am working on has a small iframe in the middle of the page which displays various documents/images. The links on the main page target the iframe and all work fine with the exception of one. The problem document is a long document with several named anchors. When the document is called up by the links it loads correctly but, the entire webpage "jumps" upward so that the top of the iframe is right up under the browser address bar and the top of the webpage disappears under the browser bar as though the whole page were scrolled upward. This only happens when viewing at resolutions of 1024x768 or less. Does anyone have any ideas how to fix this other than to cut up the document and make each section a smaller seperate document?

Code for main page:
<td><iframe name="window" id="window" src="edit/home.html" width="384" height="380" frameborder="0" scrolling="auto" marginwidth="1" marginheight="1">no frames text</iframe></td>

Code for image links:
<a href="edit/members.html#fch" target="window"><img src="images/logo_fch.jpg" width="80" height="66" border="0"></a>

Code to name section of doc to be displayed in iframe:
<a name="fch"></a>
<a name="whh"></a> etc

If you need to see it in action - http://www.spottediguana.com/AdHunts and the offending document is called up by any of the round logo icons along the bottom of the page.

Would appreciate any assistance on this prob - am going grey over this, and that color doesn't suit me
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Thu Sep 15, 2005 5:50 pm     Reply with quote



I could not replicate that on IE 6.0. What browser are you using? It would be better / more compatible to use separate documents
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Thu Sep 15, 2005 6:58 pm     iframes - targeting multiple anchors in one document Reply with quote

I'm using IE6.0, however, the same thing happens in Firefox. Netscape handles it fine. The problem occurs only at resolutions of 1024 x 768 or lower and only with the document targeted by the round icons along the bottom of the page.

cap
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Thu Sep 15, 2005 6:58 pm     iframes - targeting multiple anchors in one document Reply with quote

I'm using IE6.0, however, the same thing happens in Firefox. Netscape handles it fine. The problem occurs only at resolutions of 1024 x 768 or lower and only with the document targeted by the round icons along the bottom of the page.

cap
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Thu Sep 15, 2005 7:53 pm     Reply with quote

You do not have that much actually wrong with your code. You do not have a DOCTYPE listed actually. I made my browser windows smaller and I still did not see the jumping or anything like that
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Wed Sep 21, 2005 1:14 pm     Reply with quote

I've replaced the DOCTYPE. Perhaps you did not make your window small enough to see the effect. If you drag the bottom edge of the browser up high enough that the reddish bar with the text links on it is covered and then click one of the round logo icons that should do it.

Thanks
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Wed Sep 21, 2005 1:59 pm     Reply with quote

I see the problem but are you really worried about that - if someone is viewing your site in that manner?

The reason it is happening (if I remember correctly) is because of where the anchor is located in regard to the size of the window
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Wed Sep 21, 2005 4:04 pm     Reply with quote

What you did there was to simulate the view at a lower resolution. Anyone viewing the site at resolutions of 1024 x 768 or less will have this problem because at those resolutions the bottom of the page extends below the browser bar.

Wherever I place my <a name="the spot"></a> THAT spot on the page becomes the first line displayed at the top of the iframe.

Have tried <body valign="bottom"> and <div valign="bottom"> to try to hold the page in place.

cap
Corey Bryant
Site Admin


Joined: 15 May 2004
Posts: 8267
Location: Castle Rock CO USA

PostPosted: Wed Sep 21, 2005 4:08 pm     Reply with quote

Try the folks over at International Web Developers Network - if anyone will know, they will know
cap



Joined: 15 Sep 2005
Posts: 6

PostPosted: Wed Sep 21, 2005 5:53 pm     Reply with quote

Thanks. If I get an answer I'll be sure to post it here. I can't believe I'm the only one who has had this problem.

cap
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial