View Full Version : How to achieve document-in-document for cross browsers

05-07-2005, 06:34 PM
I'm working on a project where I need to embed a document (preferably Word format) into an HTML page. The document-in-document script is exactly what I need, but it does not work with other browsers. The drop-down document viewer and tabbed document viewer would be ideal, but the script does not have a way to remove the scrollbars (or at least give an option as to the document size as to whether to include scrollbars or not include them). Plus, when clicking the tabs, the pages load very slowly, and if loading an external document such as Word, it shows the Word editing tools.

Does anyone have any suggestions on how I can get the document-in-document script effect for cross browsers?

Thanks in advance for your help and suggestions.

05-08-2005, 02:06 AM
Well one thing, to remove scrollbars, set scrolling="no" in the iframe tag. Ex:

<iframe scrolling="no" height="300" width="600" src="some.htm"></iframe>Or, to selectively use scrolling or not, set it to auto, the size and layout of the document will decide the need for either horizontal, vertical or both scrollbars.

You can also set scrolling="yes" or to auto, and then in the body tag of a document being loaded into the iframe use:

<body overflow="hidden">No scrollbars for that page when loaded in the iframe.

Now, when you load a word document over the internet, depending upon a user's browser and OS settings, it will usually launch Word. Nothing you can do about that. You can however, using Word, save a word document as HTML. Results vary but, you will get an HTML page that is at least an approximation of the original word document and, if you know how, you can tweak its appearance in a text (recommended) or other editor. That HTML page will load without launching Word.

If a page containing an iframe is loaded, the speed at which documents load into that iframe is little, if any, different from the speed at which they would load into their own window.

I hope some or all of this is helpful.