Iframe and Word documents

T

Thomas Scheiderich

I am trying to set up a way to display Word documents in our intranet. We
have to set a quick and dirty way to display our Quality Control Documents.
We have about 150 .doc files that need to be displayed.

I was trying to use Iframes as a quick way to display word documents and to
start I set up a small file to just set up the IFrame and open the document.


****************************************
<html>
<iframe src="tfs.doc" width="600px" height="400px" />
</body>
</html>
****************************************

It sets up a window frame with a bunch of controls. I would like to know if
there is a way to limit what controls are set up. It seems to have problems
if you change views, such as normal view. The controls go away and I can't
do anything with it at that point.

If I close the browser, it then opens up in the view I last set it (in this
case, normal view without the controls).

What am I doing wrong here?

Thanks,

Tom
 
S

SpaceGirl

****************************************
<html>
<iframe src="tfs.doc" width="600px" height="400px" />
</body>
</html>
****************************************


That's not the right syntax for an iframe. In HTML (see:
http://www.w3.org/TR/REC-html40/present/frames.html#edef-IFRAME) iframes
must be closed <iframe> ... </iframe>.

<iframe ... /> is incorrect. However, it might be okay under XHTML (I've
tried looking through W3C, but there is no specific mention).
 
S

Steve Pugh

SpaceGirl said:
"Thomas Scheiderich" <[email protected]> wrote:

(missing attribution re-inserted)
That's not the right syntax for an iframe.

True, it's missing any content for browsers that can't render iframes.
The more glaring errors in the above code are the </body> with no
In HTML (see:
http://www.w3.org/TR/REC-html40/present/frames.html#edef-IFRAME) iframes
must be closed <iframe> ... </iframe>.
<iframe ... /> is incorrect.
However, it might be okay under XHTML (I've
tried looking through W3C, but there is no specific mention).

<iframe /> is valid XHTML, just as <p /> is valid XHTML, but it isn't
recommended. Only elements that are empty (roughly - those that have
no end tags in HTML 4) should be written with the <foo /> version in
XHTML if you are aiming for compatability with tag soup slurpers.

But I don't think any of the above has anything to do with the OP's
question.

Steve
 
J

Jukka K. Korpela

Thomas Scheiderich said:
I am trying to set up a way to display Word documents in our
intranet. We have to set a quick and dirty way to display our
Quality Control Documents.

Sorry, the following way is just quick, not dirty:

We have about 150 .doc files that need to
be displayed.

Then the quick and dirty way is to create a list of 150 links as above,
in alphabetic order. It might be a good idea to keep it anyway, even if
you later construct a hierarchic system (that is, a set of lists with
headings, maybe with a top-level menu with entries pointing to the
headings).
I was trying to use Iframes
Why?

<iframe src="tfs.doc" width="600px" height="400px" />

If you really want to use iframe, use e.g.

<iframe src="tfs.doc" width="100%" height="400">
<a href="tfs.doc">Quality Control rules OK!</a>
</iframe>

More info: http://www.cs.tut.fi/~jkorpela/html/iframe.html
It sets up a window frame with a bunch of controls.
Maybe.

I would like to
know if there is a way to limit what controls are set up.

Maybe, but not in HTML. It might be possible to tune people's
workstations. But why?
 
S

Steve Pugh

Thomas Scheiderich said:
I am trying to set up a way to display Word documents in our intranet. We
have to set a quick and dirty way to display our Quality Control Documents.
We have about 150 .doc files that need to be displayed.

I was trying to use Iframes as a quick way to display word documents and to
start I set up a small file to just set up the IFrame and open the document.

How is this quicker than just linking to the Word Doc? Now the browser
has to download and display the HTML file and the Word Doc rather than
just the Word Doc.
****************************************
<html>
<iframe src="tfs.doc" width="600px" height="400px" />
</body>
</html>
****************************************

As pointed out in other posts this is mangled syntax. Please validate
you code before asking questions as it helps to avoid a lot of obvious
issues.

Not mentioned in the other posts is that pixel lengths in (X)HTML
should not have any units attached. You're mixing (X)HTML and CSS
syntax as well as writing mangled (X)HTML.
It sets up a window frame with a bunch of controls.

Web browser controls or MS Word controls?

The above will often (but not always, it depends on the user's
configuration) result in a normal browser window with normal browser
controls and then MS Word controls inside the iframe.
I would like to know if
there is a way to limit what controls are set up.

That's probably going to require configuration of the browser and MS
Word (or whatever they use ) on the users' computers. If all your
users are using MSIE and trust your server then you may be able to use
an ActiveX thingy to give you some control over what toolbars, etc.
are displayed. Either way it's not an HTML issue.
It seems to have problems if you change views, such as normal view.
The controls go away and I can't do anything with it at that point.

Change view in the browser or in the instance of MS Word that's
running in the iframe?
If I close the browser, it then opens up in the view I last set it (in this
case, normal view without the controls).

Normal _browser_ view withour _MS_Word_ controls, I presume?
Well, of course it does, what else would you expect it to do when you
open the browser? Only when a Word Doc is opened is MS Word brought
into the picture.

Steve
 
J

Jukka K. Korpela

Steve Pugh said:
True, it's missing any content for browsers that can't render
iframes.

It also has incorrect (though valid) values for width and height
attributes.

Lack of any content in iframe is not a syntax error, however.
<iframe src="tfs.doc" width="600" height="400"></iframe>
is valid. Whether it's adequate is a different issue; it could be, since
the adequate replacement on non-frames browsers might be empty, just as
The more glaring errors in the above code are the </body>
with no <body> and the absence of the mandatory title element.

Absence of title is surely serious, both formally and practically. The
document also lacks a DOCTYPE declaration, so we cannot really guess
whether it was meant to be HTML 4.01 or XHTML.

If it is to be XHTML, then both <body> and </body> must be present.
If not, both are optional. The presence of </body> does not affect the
optionality of <body>. (But it's of course _confusing_ to omit just the
start tag.)
 
D

Dennis Marks

Thomas Scheiderich said:
I am trying to set up a way to display Word documents in our intranet. We
have to set a quick and dirty way to display our Quality Control Documents.
We have about 150 .doc files that need to be displayed.

I was trying to use Iframes as a quick way to display word documents and to
start I set up a small file to just set up the IFrame and open the document.


****************************************
<html>
<iframe src="tfs.doc" width="600px" height="400px" />
</body>
</html>
****************************************

It sets up a window frame with a bunch of controls. I would like to know if
there is a way to limit what controls are set up. It seems to have problems
if you change views, such as normal view. The controls go away and I can't
do anything with it at that point.

If I close the browser, it then opens up in the view I last set it (in this
case, normal view without the controls).

What am I doing wrong here?

Thanks,

Tom
Excuse my ignorance. I am using a Mac and I don't have Word so I'm not
sure what you are doing. Does the PC come with a plugin for displaying
Word documents in a browser? Does it come with Word and would it work
on a Mac also?
 
K

KirstyH

Dennis said:
Excuse my ignorance. I am using a Mac and I don't have Word so I'm not
sure what you are doing. Does the PC come with a plugin for displaying
Word documents in a browser? Does it come with Word and would it work
on a Mac also?

For quick and dirty on an intranet the OP presumably knows the target
computer.

Wouldn't it be far easier to have a "public" directory where these
documents can be found by EVERYONE on your intranet through the standard
Word Open file interface? You can make them read only. Assuming your
server plays nicely that is.

Kirsty (who has been on holiday so has probably missed some vital
information about this problem)
 
T

Thomas Scheiderich

Steve Pugh said:
(missing attribution re-inserted)


True, it's missing any content for browsers that can't render iframes.
The more glaring errors in the above code are the </body> with no



<iframe /> is valid XHTML, just as <p /> is valid XHTML, but it isn't
recommended. Only elements that are empty (roughly - those that have
no end tags in HTML 4) should be written with the <foo /> version in
XHTML if you are aiming for compatability with tag soup slurpers.

But I don't think any of the above has anything to do with the OP's
question.
That's true. But it is good to know.

Thanks,

Tom.
 
T

Thomas Scheiderich

Jukka K. Korpela said:
It also has incorrect (though valid) values for width and height
attributes.

Lack of any content in iframe is not a syntax error, however.
<iframe src="tfs.doc" width="600" height="400"></iframe>
is valid. Whether it's adequate is a different issue; it could be, since
the adequate replacement on non-frames browsers might be empty, just as


Absence of title is surely serious, both formally and practically. The
document also lacks a DOCTYPE declaration, so we cannot really guess
whether it was meant to be HTML 4.01 or XHTML.

If it is to be XHTML, then both <body> and </body> must be present.
If not, both are optional. The presence of </body> does not affect the
optionality of <body>. (But it's of course _confusing_ to omit just the
start tag.)
Actually, it is going to be part of my ASP.Net page. I was just trying to
get the most basic page to only deal with the Iframes itself. As was
correctly pointed out, I am missing the Body tags. But once I get it the
way I want it, I was going to cut and past the IFrame section into my ASP
page.

I was mainly looking at how to best display my Work docs and IFrame seemed a
good way (if I can get rid of some of the controls (views, ruler etc) as I
am only going to use this to allow our inhouse people to access the pages
quickly. They are only going to view the pages.

Thanks,

Tom.
 
T

Thomas Scheiderich

Jukka K. Korpela said:
Sorry, the following way is just quick, not dirty:

<a href="tfs.doc">Quality Control rules OK!</a>
That works, also.

It gives me the same problem as I was getting with IFrames, where it has all
the controls (views, rulers etc) and I would like to display just like that
with just the srollbars - since we are not going to edit the page.

I also find that the page usually starts out in Page Layout view and, as
does Normal view, will not show or allow you to use the links.

If you go to outline layout view, you see the links but also lose the
controls (except the scrollbar) and cannot go back to the previews views.
Also, once you get to this view, if you call it up again, it will start out
in this view (and as mentioned has no way - that I can find) to go to the
other view.

Need to be able to control this somehow.

Thanks,

Tom.
 
T

Thomas Scheiderich

Sorry, I didn't finish this reply before hitting the send button (by
accident).
Thomas Scheiderich said:
That works, also.

It gives me the same problem as I was getting with IFrames, where it has all
the controls (views, rulers etc) and I would like to display just like that
with just the srollbars - since we are not going to edit the page.

I also find that the page usually starts out in Page Layout view and, as
does Normal view, will not show or allow you to use the links.

If you go to outline layout view, you see the links but also lose the
controls (except the scrollbar) and cannot go back to the previews views.
Also, once you get to this view, if you call it up again, it will start out
in this view (and as mentioned has no way - that I can find) to go to the
other view.

Need to be able to control this somehow.

Thanks,

Tom.
Why not? What I wanted to do was put this in the content portion of my
page. I am not using frames, but have our company logo on the top of the
page and our menus down the left. I wanted to put the document in the
bottom right of the page (which would be inside a cell our table).

I was told that IFrames would be a good way to go.

Is there some reason, why I shouldn't do it this way?
This seems like a good way to do it. I did try this, but I never get the
link. It just goes directly to the page (which may be what you meant it to
do). Here is the code I used:

**************************************
<html>
<head>
</head>
<body>
<iframe src="tfs.doc" width="100%" height="400">
<a href="tfs.doc">Quality Control rules OK!</a>
</iframe>
</body>
</html>
**************************************
Also, as mentioned before, since I had already opened a .doc once and looked
at it in Outline Layout View, it comes up this way and there seems to be no
way to stop it or change it.Because, as mentioned above, I am not editing it and some of the controls,
such as Outline Layout View, will lock you into that view and you can't seem
to get back.

I just want to have scrollbars so the person can just look at the page.

Thanks,

Tom.
 
T

Thomas Scheiderich

Steve Pugh said:
document.

How is this quicker than just linking to the Word Doc? Now the browser
has to download and display the HTML file and the Word Doc rather than
just the Word Doc.

By quicker, I meant that would fit in my template.

The problem with this is that if you open up the Word Doc, you lose the Part
of the Window that I set up to frame the page (not Frames) - the top of the
page is the Logo and the left side (about 100 pixes) all the way down is
blue with my menu buttons on it. I wanted it to fit in the middle to the
left side of the window all the way down.
As pointed out in other posts this is mangled syntax. Please validate
you code before asking questions as it helps to avoid a lot of obvious
issues.

Did that. I changed the page to look like:

*************************************************
<html>
<head>
</head>
<body>
<iframe src="tfs.doc" width="100%" height="400">
</iframe>
</body>
</html>
************************************************

This is not meant to be my actual page, just a page to test IFrames and Word
Doc displays. When I have it the way I want it, I will cut an paste it into
my real pages.
Not mentioned in the other posts is that pixel lengths in (X)HTML
should not have any units attached. You're mixing (X)HTML and CSS
syntax as well as writing mangled (X)HTML.


Web browser controls or MS Word controls?

I believe it is MS Word controls.
The above will often (but not always, it depends on the user's
configuration) result in a normal browser window with normal browser
controls and then MS Word controls inside the iframe.


That's probably going to require configuration of the browser and MS
Word (or whatever they use ) on the users' computers. If all your
users are using MSIE and trust your server then you may be able to use
an ActiveX thingy to give you some control over what toolbars, etc.
are displayed. Either way it's not an HTML issue.

Actually, this is going to go into an ASP.NET page. And as you say this is
not an HTML issue. But I needed to start here as I am, at the moment, just
trying to find out it this is a good way to do this.
Change view in the browser or in the instance of MS Word that's
running in the iframe?

Where do I do that? I don't want to change MS Word on the computer, just
the way it displays as a Web Page.
Normal _browser_ view withour _MS_Word_ controls, I presume?
Well, of course it does, what else would you expect it to do when you
open the browser? Only when a Word Doc is opened is MS Word brought
into the picture.

No, Normal View is an MS Word control (I think). At the bottom of the page
there are various buttons that control the type of view you want to see
(Page View, Normal View, Layout View and Outline View). The problem is that
if I change to Normal View - I am now stuck. Everytime I open any Word
Documents in my browser, it always opens in Normal View (whether in an
IFrame or as a Word Doc type of page).

Thanks,

Tom
 
T

Thomas Scheiderich

Dennis Marks said:
Excuse my ignorance. I am using a Mac and I don't have Word so I'm not
sure what you are doing. Does the PC come with a plugin for displaying
Word documents in a browser? Does it come with Word and would it work
on a Mac also?

I just tried it and what happens on my Mac (whether IFRames - which doesn't
seem to work, although it does show the IFrames outline or just a link to
the doc) is that the Download manager starts, it downloads the page, starts
up a new page that has the Word controls on it and the page is displayed
there.

The interesting thing is that even if I change it to Words Normal View, the
next time I access the page it opens in Page Layout View (which has all the
controls, unlike the Normal view - which doesn't).

I assume you have to have Word on the machine for it to work. I didn't load
any plugin to make it work.

Tom.
 
T

Thomas Scheiderich

KirstyH said:
For quick and dirty on an intranet the OP presumably knows the target
computer.

Wouldn't it be far easier to have a "public" directory where these
documents can be found by EVERYONE on your intranet through the standard
Word Open file interface? You can make them read only. Assuming your
server plays nicely that is.

Yes, I do know the target computer and the documents are in a separate
folderl. But they want to access the pages through a browser interface.
This would allow them to set up links from inside of pages as well through
menus and submenus and they can set the titles to what they want as opposed
to what the documents are actually set to. There are about 150 documents
and will be accessed using ASP.Net, hopefully.

Tom.
 
D

Dennis Marks

Thomas Scheiderich said:
I just tried it and what happens on my Mac (whether IFRames - which doesn't
seem to work, although it does show the IFrames outline or just a link to
the doc) is that the Download manager starts, it downloads the page, starts
up a new page that has the Word controls on it and the page is displayed
there.

The interesting thing is that even if I change it to Words Normal View, the
next time I access the page it opens in Page Layout View (which has all the
controls, unlike the Normal view - which doesn't).

I assume you have to have Word on the machine for it to work. I didn't load
any plugin to make it work.

Did an actual web page open with the document as it does with a PDF
(which uses Acrobat reader with a web plugin) or was it a Word program
window? Maybe when Word is installed it installs a browser plugin.

Any document can be defined in the browser to start another program
after a download.
 
T

Thomas Scheiderich

Dennis Marks said:
Did an actual web page open with the document as it does with a PDF
(which uses Acrobat reader with a web plugin) or was it a Word program
window? Maybe when Word is installed it installs a browser plugin.

On the Mac, it appears to be a Word window that is opened not a browser
window.

Tom
 
A

Alexandre Jasmin

If I close the browser, it then opens up in the view I last set it (in this
case, normal view without the controls).

You could have more control over this is you use the <object> or <embed>
tag.
 
T

Thomas Scheiderich

Alexandre Jasmin said:
You could have more control over this is you use the <object> or <embed>
tag.

How would I do that? Is there a document that tells how to do this -
specifically with a word document?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top