[web] JavaScript help

Started by
9 comments, last by Sander 17 years, 5 months ago
I am tring to access a file for reading and writeing and i am a newbe on this language all i kno is graphs and alerts i am not tring to put file on user com i want it on my webpage. it is for my user accounts. dose anyone have infomation for me?
Advertisement
Firstly, if this is for web pages, you should be posting in the web development forum. Thus, I will move this post.

Secondly... please describe in more detail what you are trying to achieve. What sort of file are you hoping to access, and why? Remember &#106avascript runs on the client, not the server. If you allowed a browser to edit a file on any web server the entire web would probably have been destroyed long ago. Therefore you would usually have to access a certain page on your server which is written in a server-side language, which then performs the edits for you. &#106avascript is probably not the correct tool for the job.
If this is about uploading files to the server for display on a page, you don't need &#106avascript. Check <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=422481">this thread</a>.

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

If you were wanting to do something like that wouldn't you use PERL?
Kenjutsu maybe a lost art, but tell me I'm stupid for wanting to take a knife toa gunfight after watching this http://www.comegetyousome.com/misc/videos/bulletvskatana.wmv
i am tring to read text files with username and passwords for a login page, i wont only invited people in some parts of my page.

the text is on the same page as the html
Using client-side script for authentication is a mistake, as the user can trivially bypass it (in most cases).

If you have a file containing usernames and passwords that &#106avascript can read, so can the end-user.

Even if you encrypt the passwords using a one-way function, the user can still do dictionary attacks and/or bypass it.

Mark
so wht would u suggest instead? if anything.
Use either Apache's htaccess system (or whatever the IIS equivalent) or look into a server side scripting system (PHP, ASP.net, Ruby).

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

one more question:

Is it possible to use a program written in c to access a file on a web page or only in java? if this is possible i would like links, i googled and couldn't find anything on it.
-bump-

This topic is closed to new replies.

Advertisement