Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: File Formatting in Web Page


Message #1 by "T.Gopalakrishnan" <tgk26@r...> on Tue, 10 Dec 2002 07:25:49
Hi

I want to open the file directly within the browser (and not inside a text 
area)

I am Using window.open method to open a file.The file has no extension and 
the content of the file is pure text. If i try to open that form browser's 
file/open the content of the file is shown with the proper formatting. But 
when i am trying to open that file in side my application using Apache 
Tomcat the formatting is lost. i also tried the document.open() method to 
set mime type but it doesn't seem to be working.

Is there any way to get this working?

Yours
T.Gopalakrishnan



> 	What do you mean by "like a word pad" ?

	Your users can't edit the file ?  Put the content within the
<textarea> element then.

	The font width is monospace but you want something like Times or
Arial ?  Show the content as normal text and don't use <pre> if you had =
done
so.

> -----Message d'origine-----
> De : T.Gopalakrishnan [mailto:tgk26@r...]
> Envoy=C3=A9 : mardi 10 d=C3=A9cembre 2002 08:26
> =C3=80 : javascript
> Objet : [javascript] File Formatting in Web Page
>=20
>=20
> Dear,
>   I am showing the file contents in browser,but that is not=20
> showing like a=20
> word pad and etc. How can i do it in browser?.
> Expecting the things as Earlier as Possible.
>=20
> With regards,
> Royan.

  Return to Index