Jump to content
  • Advertisement
Sign in to follow this  
Thoover

[web] JavaScript help

This topic is 4267 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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 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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Use either Apache's htaccess system (or whatever the IIS equivalent) or look into a server side scripting system (PHP, ASP.net, Ruby).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!