ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Calling Javascript Boffins... (General Discussion)
Calling Javascript Boffins... // General DiscussionrobbieAug 13, 2002, 10:39am
I need a javascript to dynamicly resize an iframe's height based on the
length of the HTML file it is loading into it so that there is no need for scroll bars. This is because I am using PHP to create a website where the content for my site is loaded into the template file eliminating the need for multiple files with the template in. Offcourse different pages that I load into it will be different lengths (width isnt an issue) so I need a javascript to do this. I've looked all over the net and cant find one that works properly. I used to have one buy it was lost when I had to reformat. From what I remember it was a function that was called in the body tag onLoad and resized based on the window.height of the page it loaded in. The actua ljavascript that did the resizing was in the HTML file it loaded in, not the file with the iframe, although the template file was in DIV tags. Can anyone help me? :) -Robbie goober kingAug 13, 2002, 1:59pm
Still not quite clear on what it is you're trying to do. I understand
the resizing the Iframe part (which you should get rid of anyway, IFrames are IEvil :P), but what is it going to be based on? If it's the height of the HTML file, that could be hard to determine, given that people might be using different browser sizes. Any chance you have an example to show? [View Quote] > I need a javascript to dynamicly resize an iframe's height based on the > length of the HTML file it is loading into it so that there is no need for > scroll bars. This is because I am using PHP to create a website where the > content for my site is loaded into the template file eliminating the need > for multiple files with the template in. Offcourse different pages that I > load into it will be different lengths (width isnt an issue) so I need a > javascript to do this. > > I've looked all over the net and cant find one that works properly. I used > to have one buy it was lost when I had to reformat. From what I remember it > was a function that was called in the body tag onLoad and resized based on > the window.height of the page it loaded in. > > The actua ljavascript that did the resizing was in the HTML file it loaded > in, not the file with the iframe, although the template file was in DIV > tags. > > Can anyone help me? :) > > -Robbie > > > -- Goober King Help me to help you! robrod at prism.net wizard myrddin wiz@(removeAug 13, 2002, 2:27pm
Try to get a DW plug in, there is some good ones on the site for registered
users. Covers all topics in frame resizing. [View Quote] dionAug 13, 2002, 3:57pm
It'd be much easier to use PHP include statements to configure a template
for your page. Javascript is taken differently by some browsers and is sometimes disabled which would make your page not able to be viewed at all. [View Quote] |