/    Sign up×
Community /Pin to ProfileBookmark

iframe problem!

Okay….I have an iframe question….When I link to a link not in the iframe to show in it…..the page loads fine with no scrollbar….when i link to a page in the iframe to another page in the iframe……it changes the size of the iframe and puts a scrollbar on the iframe…..what is goin’ on……heres a link to my site where you can see what i’m talkin’ about:

[URL=http://www.warsaw.k12.in.us/wchs/hidden]http://www.warsaw.k12.in.us/wchs/hidden[/URL]

When you click on Art on the side menu bar is shows a page in the iframe in the middle….when you choose a teacher from the sidebar it shows the iframe correct w/out the scrollbar…..when you click on Art again and then choose a teacher from the iframe….it loads the same homework.asp page in the server…..but shows a scrollbar and the iframe is shorter…..please help!

to post a comment
HTML

22 Comments(s)

Copy linkTweet thisAlerts:
@rhsundergroundApr 19.2004 — don't know about the scrollbars; the code looks good enough for me. i'll let somebody else tackle that.

the pages for guidance and comments cannot be found. in firefox, the menu does not work, as no teachers show up. only the art teachers show up in netscape, and they show up in the middle of the iframe. the same effect happens with opera 7, but all the teachers show up in the menu and there are two random boxes above the art teachers in the middle of the iframe.
Copy linkTweet thisAlerts:
@PhillMcApr 19.2004 — from your site:
<i>
</i>&lt;script language="javaScript" src="crossB.js"&gt;&lt;/script&gt;
&lt;script language="javaScript" src="navBar.js"&gt;&lt;/script&gt;
&lt;script language="javaScript" src="writeTitle.js"&gt;&lt;/script&gt;
&lt;script language="javaScript" src="homeTab.js"&gt;&lt;/script&gt;
&lt;script language="javaScript" src="clock.js"&gt;&lt;/script&gt;

&lt;script language="javaScript" src="ticker.js"&gt;&lt;/script&gt;
&lt;script language="javaScript" src="height.js"&gt;&lt;/script&gt;


You're relying too much on JavaScript for vital parts of the site, as 13 percent of the internet public will not be able to use this site because of the abundance of JS. In fact, the whole site is relying on JS; this is bad ?

Same story with the IFRAME, this is less accessible than JS; a DIV with OVERFLOW set to AUTO and use of SERVER SIDE INCLUDES would be much more accessible than an IFRAME.

There isn't a DOCTYPE declared; this forces the browser to guess at how to render the page; also bad ?
Copy linkTweet thisAlerts:
@chrismartzauthorApr 19.2004 — what do you mean about the doctype...also....What can i use instead of an iframe to look the same on screen?
Copy linkTweet thisAlerts:
@SamApr 19.2004 — [URL=http://www.w3.org/QA/2002/04/valid-dtd-list.html]doctypes[/URL]

As to the iframe, you can use:

<div style="overflow:auto;width:100px;height:100px"></div>

Note that the height and width are obligatory numbers, but neccessary for the overflow effect to work properly, and that styles work most effectively when defined in the head rather than inline
Copy linkTweet thisAlerts:
@PhillMcApr 19.2004 — What he said. lol (he beat me to it)
Copy linkTweet thisAlerts:
@chrismartzauthorApr 19.2004 — so like:

[CODE]<div style="overflow:auto;width:100px;height:100px"><iframe src=page.asp></iframe></div>[/CODE]

is this what you mean?
Copy linkTweet thisAlerts:
@SamApr 20.2004 — more like &lt;div style="overflow:auto; width:100px; height:100ps"&gt;&lt;!--#include file="page.asp"--&gt;&lt;/div&gt;
Copy linkTweet thisAlerts:
@chrismartzauthorApr 20.2004 — then how do i link other pages to open in that same div? i can't use iframe?
Copy linkTweet thisAlerts:
@SamApr 20.2004 — you could either have the included file be determined through the query string, or have a seperate shell page for each include

EDIT: and no, iframes are bad/evil/[insert words with a negative conotation]
Copy linkTweet thisAlerts:
@chrismartzauthorApr 20.2004 — that'll take time which i don't have....an iframe is much easier....with what i have with the links on the side on[URL=http://www.warsaw.k12.in.us/wchs/hidden]http://www.warsaw.k12.in.us/wchs/hidden[/URL]
Copy linkTweet thisAlerts:
@SamApr 20.2004 — iframes may seem easier, but in the long run the include method will be faster and take up less bandwidth
Copy linkTweet thisAlerts:
@chrismartzauthorApr 20.2004 — thats the thing.....i don't understand what/how to switch from an iframe and this include now.....how do i link the same as what was!
Copy linkTweet thisAlerts:
@PhillMcApr 20.2004 — either make the switch to CSS w/ DIVS now, when there are less pages to make the changes to, or later when it will take more time and resources. In my opinion, you will be doing your client a serious dis-service by using non-standard elements to create this site. ? At the very least you need to cut back on the JS and do those things server side. I would explain things a bit more, but I have to close up my shop, so you will have an explaination tomorrow morning if one is not provided to you tonight. ?
Copy linkTweet thisAlerts:
@PeOfEoApr 20.2004 — iframe problem: i[b]frame[/b].
Copy linkTweet thisAlerts:
@chrismartzauthorApr 20.2004 — haha...very funny peofeo....i just think they are easy to use and am angry that i have to change almost 25 pages
Copy linkTweet thisAlerts:
@PeOfEoApr 20.2004 — [i]Originally posted by sirhcchris3 [/i]

[B]haha...very funny peofeo....i just think they are easy to use and am angry that i have to change almost 25 pages [/B][/QUOTE]

<i>
</i>&lt;!-- #Include virtual="layout.inc" --&gt;

This is the syntax for an include with asp classic, asp.net and ssi.
Copy linkTweet thisAlerts:
@chrismartzauthorApr 21.2004 — i know you all will hate me for this....but i'm gonna stick with an iframe for now....I just have a question about it....when you go to [URL=http://www.warsaw.k12.in.us/wchs/hidden]http://www.warsaw.k12.in.us/wchs/hidden[/URL] and then click on administrators on the left menu bar......then choose an administrator from the list on the page.....when the new page opens.....the whole page won't scroll...but with other pages not linked to internally from the iframe it streaches the iframe.....like if you choose a teacher under one of the class catagories.....please help!
Copy linkTweet thisAlerts:
@PeOfEoApr 21.2004 — I choose not too if you are going to use an iframe :p . ctually I do not see the prob on mozilla but I do see the whole site out of alignment. Design for mozilla and opera, hack it back for ie.
Copy linkTweet thisAlerts:
@IncaWarriorApr 21.2004 — iframes are a good tool
Copy linkTweet thisAlerts:
@PhillMcApr 21.2004 — [i]Originally posted by IncaWarrior [/i]

[B]iframes are a good tool [/B][/QUOTE]


I will admit that IFRAMES can be a good tool if you will admit that they are not accessible :p

I choose not too if you are going to use an iframe . ctually I do not see the prob on mozilla but I do see the whole site out of alignment. Design for mozilla and opera, hack it back for ie.[/QUOTE]

Agreed. However, I believe that you will experiance far less accessibility/compatibility problems rewriting the site with accessibility in mind. ?

i know you all will hate me for this....but i'm gonna stick with an iframe for now....I just have a question about it....when you go to http://www.warsaw.k12.in.us/wchs/hidden and then click on administrators on the left menu bar......then choose an administrator from the list on the page.....when the new page opens.....the whole page won't scroll...but with other pages not linked to internally from the iframe it streaches the iframe.....like if you choose a teacher under one of the class catagories.....please help![/QUOTE]

Fact is, you will continue to experiance problems much like this one if you plan to stick with the IFRAME. They might catch on in a few years, but, then again, Framesets still havn't. ?
Copy linkTweet thisAlerts:
@chrismartzauthorApr 21.2004 — i found a simple javascript to fix this problem and have another site for non ie people! far less javascript
Copy linkTweet thisAlerts:
@PeOfEoApr 21.2004 — [i]Originally posted by sirhcchris3 [/i]

[B]i found a simple javascript to fix this problem and have another site for non ie people! far less javascript [/B][/QUOTE]
ummm??? What are you talking about. You need to not be using java script for browser detection, you use asp, so why are you using crap inaccessable java script when you can be using the http user agent for browser detection. Anyways a better solution is to make one page for everyone and not use iframes or javascript in ways that will hinder functionality if a user does not have them.
×

Success!

Help @chrismartz spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...