Page 1 of 1

Updating a file online on browser

Posted: Fri May 14, 2004 5:26 am
by softsolvers
Hi fellows
I have a query, I am opening the .txt file on the browser, now i want to modify means type somthing on that file ,and i want to save that file by clicking on a button ,Is it possible.
I mean i want to save a file online,I open a .txt,.doc etc file type some text on that and save it just by clicking on he button.
Hope u will help me.

Posted: Fri May 14, 2004 6:29 am
by kettle_drum
Of course it is. Open the txt file up and place the content of it in a form (<textarea>*content of file*</textarea>), then let the user edit this form to his/her hearts content. Then submit the form, and simply write the content of the textarea back into the file.

Simple as that!

Posted: Fri May 14, 2004 6:40 am
by softsolvers
Thanks but is was asking that can i update any type of file on the browser itself

Posted: Fri May 14, 2004 8:07 am
by launchcode
Any type of file? No, not really - you couldn't (easily!) edit say a GIF file or a Word document for example.

Posted: Fri May 14, 2004 8:10 am
by softsolvers
What is the reason, is it requires some browser configuration,
Please tell me the reason?

Posted: Fri May 14, 2004 8:16 am
by launchcode
Err... because web browsers are just that - browsers. They're not built for editing extremely rich content like that.

You can edit a text file easily, heck you *might* be able to edit a Word document via something like HTMLarea (search Google for it), but that's about it.

Posted: Fri May 14, 2004 8:31 am
by patrikG
And even HTMLArea is dealing with HTML (as the name suggests). The Word document is converted into HTML by Window's clipboard.

That's what browsers do: they display HTML. That's what Mosaic, the first one, did: it only displayed HTML. Later on you had Javascript coming in.

And that's also the reason why Flash/Shockwave/QuickTime/Acrobate Reader are plug-ins (i.e. external extensions). If you write a GIF-editor plug-in which you offer as a download, you could edit images in the browser. Otherwise: not.