homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

JS embedding
trying to insert word docs into a html page

 1:51 pm on Jul 17, 2003 (gmt 0)

hi all,

im trying to insert multiple word docs into a html page depending on form submitting . im presuming each doc needs an <object>, or <embed> tag..

im submitting a page, then with JS in the onsubmit of the form i do ..

//set some vars with submitted values
html = these values..;
//was trying this..
document.writeln("<embed src='xxx.doc'>")

i know the embed tag is wrong, but also must i writeln the <html><body... bits in order for the page to show any embedded things?
strange to do with JS i know, but lets not go into that..

any help much appreciated ..




 5:48 pm on Jul 17, 2003 (gmt 0)

hi natty,

you have to write head and body part with open. but nevertheless for testing purposes for your object tags, this should not be necessary in my opinion.

the rest of the code (just not the embed as you pointed out) looks quite right ;).

- hakre


 6:40 pm on Jul 17, 2003 (gmt 0)

anyone know the correct way to embed a word doc in html by any chance, ive searched and searched on google, but dont have frontpage.. :-p


 7:11 pm on Jul 17, 2003 (gmt 0)

this is a first info i found in my research:

ActiveX Documents are embeddable OLE objects that behave more like ActiveX controls than traditional OLE objects. Unlike a normal embedded object, an ActiveX Document is not designed to be a contained object in a larger document. Instead, it is considered a complete document in itself, which is merely being viewed by a viewer (such as Internet Explorer) or is being collected into a single resource with other documents (such as a Binder file).

first of all, you website will only work on windows based systems - no unix, no apple (not even with ie there, in my knowledge, ms cancelled activex integration in mac ie, correct me if wrong).

internet explorer itself is able to open activex documents and - i forgot to wrote it first - a word document can be displayed as activex document like almost any ms office file (.xls, .ppt).

if i follow ms specs, an iframe with an src= attribute with the doc's filename as value should do the trick. feel free to check it out.

- hakre


 1:09 pm on Aug 6, 2003 (gmt 0)

hakre would you be kind enough as to copy the code need to embedd a word doc into an IE window! Or any one else if you know!


 9:22 pm on Aug 6, 2003 (gmt 0)

Word files as web documents. What a horrible messy thought. I don't like that idea at all.

Even PDF files would be more universally compatible than doing that (and a lot easier to set up).


 11:30 pm on Aug 6, 2003 (gmt 0)

This supposedly works, but I have no idea if it does. If so I imagine it only works in IE.

var pause = 0;
var wdDialogFileOpen = 80;
var wdApp = new ActiveXObject("Word.Application");
var dialog = wdApp.Dialogs(wdDialogFileOpen);
var button = dialog.Show(pause);


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved