homepage Welcome to WebmasterWorld Guest from 54.205.160.82
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

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
natty




msg:1470107
 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..;
document.open();
document.writeln(html);
//was trying this..
document.writeln("<embed src='xxx.doc'>")
document.close()

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 ..

cheers

 

hakre




msg:1470108
 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

natty




msg:1470109
 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
cheers

hakre




msg:1470110
 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

aspneth




msg:1470111
 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!

g1smd




msg:1470112
 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).

MonkeeSage




msg:1470113
 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.

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

Jordan

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved