Skip to main content
gamedev.net
🔒 Locked

[web] JavaScript help

Started by Thoover 9 replies 1.6k views
Original Post
Thoover
Thoover
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?
Kylotan
Kylotan
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 javascript 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. javascript is probably not the correct tool for the job.
Sander
Sander
If this is about uploading files to the server for display on a page, you don't need javascript. Check <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=422481">this thread</a>.
up in flames
up in flames
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
Thoover
Thoover
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
markr
markr
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 javascript 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
Thoover
Thoover
so wht would u suggest instead? if anything.
Sander
Sander
Use either Apache's htaccess system (or whatever the IIS equivalent) or look into a server side scripting system (PHP, ASP.net, Ruby).
Thoover
Thoover
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.
Thoover
Thoover
-bump-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.