English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i know HTML JAVASCRIPT PHP and vbscrip

i was going to try to make a pogram using html and javascript for one of my teachers but i dont know if i can, because im no sure if javascript can save or edt files if anyone knows if it can or cant please post and can i have the code? thanks

2006-11-29 10:55:57 · 4 answers · asked by willy 5 in Computers & Internet Programming & Design

yeah thats what i figured but i dont want to use PHP because then i would have to install a sever and PHP on my teachers computer... is there any other language that can edit/make files that doesnt need to be hosted on a sever?

2006-11-29 11:02:14 · update #1

i think i will try vbscript

2006-11-29 11:25:25 · update #2

4 answers

You can use VBScript and the FileSystemObject to create/read/write/append files

However you will have to allow scripting and click yes to a ActiveX interation ;)




Some website




------------------EDIT-------------------

Come to think of it JavaScript can use ActiveX objects too...



should also work....still with 0 use of anything serverside... just need to be running in IE and using Windows (FF doesn't load ActiveX still right?)

--------------EDIT2----------------

also make all files .hta and not .html... that should remove all warnings and run it as a html application (with normal exe permissions). so all the code will just "run" :)

2006-11-29 11:15:13 · answer #1 · answered by Anonymous · 0 1

Sure! contrary to popular belief, it can be done... it's called AJAX, you can read a file modify the file and 'post' the file back! either with server extensions or a simple 5 line cgi program.

the strengths of ajax incude simple text files, xml files, json (javascript object notation (I think!)) your files come right into a string, a 'dom' or an object, and can be written directly to a disk or inserted to a database, or sent to you as e-mail! it's all the power of the cgi languages with the ease of javascript!

Although I said javascript is easy, ajax done with a quality library is still easy. I use jquery (http://jquery.com) and simple ajax requests are only a few lines of code!

2006-11-29 12:06:34 · answer #2 · answered by jake cigar™ is retired 7 · 0 1

No - javascript doesn't have access to the local file system of a user and doesn't have capabilities to modify files. PHP would be a better bet for this...

2006-11-29 10:58:24 · answer #3 · answered by Gregory N 1 · 1 1

not that i know of...try javascript.com, maybe that can help

2006-11-29 10:57:44 · answer #4 · answered by FotoFan85 3 · 0 2

fedest.com, questions and answers