× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Peter,
I believe the trick is to send the proper CGI so that the correct
application is invoked.


There is an example CGI program that sends CSV files to the browser and by
sending the correct CGI header; it launches Excel within the browser itself.
The full program can be viewed on the RPGLAB website at:
 www.rpgiv.com/downloads

Or directly at the following URL:

http://www.rpgiv.com/cgi-rpg/viewsrc?FILE=QRPGLESRC&LIB=RPGLAB&MBR=CGI2EXCEL


                      
      *****************************************************************
      **  CGI Header to tell the browser we want to launch Excel.
      **  This is the key to the entire program working.
      *****************************************************************
     D cgiHdr          C                   'Content-type: application/csv; +
     D                                      charset=iso-8859-2;\n +
     D                                      Content-Disposition: "inline; +
     D                                      filename=applicants.csv"\n\n'

Change the CGI header so that it handles MS Word documents should be a
matter of flipping the /csv notation on the first and last lines to /doc as
follows: 


      *****************************************************************
      **  CGI Header to tell the browser we want to launch Excel.
      **  This is the key to the entire program working.
      *****************************************************************
     D cgiHdr          C                   'Content-type: application/doc; +
     D                                      charset=iso-8859-2;\n +
     D                                      Content-Disposition: "inline; +
     D                                      filename=yourFileName.doc"\n\n'


Note that I use '\n' to indicate a linefeed (X'25') character in these
headers as the xTools' CGILIB converts them to X'25' automatically.

-Bob



-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Peter Vidal
Sent: Tuesday, December 07, 2004 3:49 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] Insert an MS Word document in my HTML page.

Hi list!

I want to be able to read a MS Word document and have it displayed within 
a predefined frames which has already navigation buttons, a close window 
button and a print button.

Is this possible?  Any advice on this?

TIA,
Peter Vidal
PALL Corporation
SR Programmer Analyst
5775 Rio Vista Drive, Clearwater, FL 33760-3137

_______________________________________________
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.