Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Internet Explorer will not display the page correctly - Why?
Old 10-20-2008, 10:20 AM Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
I am trying to make a page that will hold my forum. I made a page with a auto resizing iFrame that contains my forum. It works perfectly in FireFox. It will also load perfectly in IE, but once you click on anything in the parent page, IE does nothing, it just seems to be continuously loading. You have to restart IE, because nothing will work after. I would appreciate any help that you could provide.

Code in head
<script language="JavaScript">
<!--
function resize_iframe()
{

var height=window.innerWidth;//Firefox
if (document.body.clientHeight)
{
height=document.body.clientHeight;//IE
}
document.getElementById("forum").style.height=pars eInt(height-
document.getElementById("forum").offsetTop-8)+"px";
}
window.onresize=resize_iframe;
//-->
</script>
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('forum').contentWindow.doc ument.body.scrollHeight;

//change the height of the iframe
document.getElementById('forum').height=the_height ;
}
//-->
</script>

iFrame

<iframe width="995" id="forum"
onLoad="calcHeight();"
src="/forum/index.php"
scrolling="NO"
frameborder="0"
height="1">
An iframe capable browser is
required to view this web site.
</iframe>

If you want to try the page, go here

Thanks
tnarg is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-20-2008, 10:30 AM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I'm surprised it works at all

var height=window.innerWidth; ??
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 10:37 AM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
why are you surprised, I am just starting to learn javascript
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 10:40 AM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
BTW

onresize doesn't work properly in IE because it triggers when the body resizes as well

on the only occasion i needed to use a resize this worked for me ->
http://snook.ca/archives/javascript/ie6_fires_onresize/
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 10:41 AM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
height = innerWidth ??

even a non-programmer should spot something wrong there
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 10:43 AM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
So how would you handle my predicament? I want to have my forum load with the same header as the website, so that it looks like the forum is actually a part of the site and not just a popup or new window.
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 10:46 AM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
Nice link BTW, I am sure that it will come in handy at some point, I need all the help that I can get.
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 11:00 AM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Well first off if I was going to use iframes, which I wouldn't at all, ever, I would at least start off with height = innerHeight

Is there a problem with setting the phpBB template to use the same header as your site does?
From past experience with the forum it's not overly complex to edit the templates.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 11:53 AM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
I had a look at adding my header content to the phpbb template files, and I found it to be quite overwhelming, I am not a programmer. I tried to find tutorials on the subject and was unable to find anything that was detailed enough so as to enable me to proceed in that manner. I understand that modifying the template files is the preferred method for interface customization of a phpbb forum.
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 11:54 AM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
why would you not use iFrames?
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 12:12 PM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
because they are crap for users and pretty poor for search engines.

Have you worked your way through -> http://www.php-editors.com/chapters/phpbb1.php ?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-20-2008, 12:15 PM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
Thanks I'll look now
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 12:16 PM Re: Internet Explorer will not display the page correctly - Why?
Novice Talker

Posts: 9
Trades: 0
does this also apply to phpbb3?
tnarg is offline
Reply With Quote
View Public Profile
 
Old 10-20-2008, 12:27 PM Re: Internet Explorer will not display the page correctly - Why?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No idea but the templating system hasn't changed much over the various upgrades.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Internet Explorer will not display the page correctly - Why?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.37427 seconds with 12 queries