Forum Moderators: open

Message Too Old, No Replies

100%,100%

Embedding an object to fill the whole window

         

hunkymonkey

3:59 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



I have an ActiveX object that I want to fill the whole screen. If I embed it into a basically empty web page, like this:
<object classid="clsid:..."
codebase="..." width = "100%" height = "100%" >

and it works great. Fills the whole screen, no problem. But if I server-side-include a cool looking header on the page (it involves quite a bit of stuff, lots of levels of tables, links, graphics, javascript, etc.), the 100% fill doesn't work anymore. Neither does "*" or "50%" or anything else like that. But I want it to fill the rest of the screen.

Any ideas?

hunkymonkey

5:18 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



I guess to make it a little clearer, if I set height="300", it works fine. I just don't want to be restricted to a fixed height.

I did have a nifty two-page setup, where the first page would capture the screen's height and width, and then in the onload event handler, I'd post that info to the next page, which would use those numbers to size the object with fixed values. But I don't like that solution because the back button on the browser no longer works as one would expect.

I suspect there's some piece of code in that included header that prevents the relative sizing to work, but I can't for the life of me figure out what. Has anyone run into this?

Thanks.

tedster

5:24 pm on Sep 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



100% is supposed to mean 100% of the available space. Have you validated the code your include brings in to the page? If there's an error there, that might make it impossible for the browser's internal routines to calculate how much space should be available.

hunkymonkey

6:12 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



Call me old-school. I've never validated HTML code. I suppose there are good commercial ones out there? Any freebies?

tedster

6:57 pm on Sep 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[validator.w3.org...]

Mostly you are looking for out-and-out errors. A few warnings about deprecated attributes and such don't make problems in a mainstream browser.

It's just that you need to ensure that your mark-up is well-formed before you can debug rendering problems. Else you can chase your own tail for a long time.

hunkymonkey

7:25 pm on Sep 24, 2004 (gmt 0)

10+ Year Member



Boy, it turned up a ton. Most were non-issues, though. The biggest was a table tag not being closed, which I had found on my own before validating. However, it's such a big mess (and I didn't write the header code nor do I have any control over it) that trying to fix it is a little out of my range.

However, I did discover the fix. It's nothing that any of you could have helped me with. I just discovered that the header code allows me to pass in the name of a javascript function that's called when a link is clicked anywhere in the header. So I put the header in a top frame, the ActiveX object in the bottom frame, and my javascript function just sets the top's url to the url clicked on in the header. Then the ActiveX object I have can just take up the whole frame space and everyone's happy.

Thanks for your help, though.