User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,601 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,464 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1202 | Replies: 4
Reply
Join Date: Jul 2007
Posts: 111
Reputation: Designer_101 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Designer_101 Designer_101 is offline Offline
Junior Poster

Question Loading Variables?

  #1  
Sep 7th, 2007
Hey
I'm having a bit of trouble. I am currently learning php and mysql to access my servers database and collect data. In which i want to use a username and password form. However in the meen time i would like to create one using plain html and javascript most likely as forms using the if and else. I am quite experienced with javascript, although i have forgotten how to load variables from an external .txt file. Otherwise my users would simply be able to view my source code and see the username and password they need to type.

Any help on this is greatly appreciated

thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Loading Variables?

  #2  
Sep 9th, 2007
If they can see your js file, they can also read the txt file.

Also, JavaScript has no way to read server files, because it runs on the client computer, not the server.

Reading a file used to be possible, but it is now a security violation.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 7,012
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 25
Solved Threads: 368
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Lazy, Useless & Apathetic

Re: Loading Variables?

  #3  
Sep 9th, 2007
> Also, JavaScript has no way to read server files
Not entirely true. You can read an XML file on the server using the XML DOM API. But this applies for only valid XML files.
I don't accept change. I don't deserve to live.

Happiness corrupts people.

Failing to value the lives of others cheapens your own.
Reply With Quote  
Join Date: Jul 2007
Posts: 111
Reputation: Designer_101 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Designer_101 Designer_101 is offline Offline
Junior Poster

Re: Loading Variables?

  #4  
Sep 10th, 2007
ok, thats great thanks people. I will use actionscript in flash to start but bring php and mysql in when i know more on php....still learning lol
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Loading Variables?

  #5  
Sep 13th, 2007
Originally Posted by ~s.o.s~ View Post
> Also, JavaScript has no way to read server files
Not entirely true. You can read an XML file on the server using the XML DOM API. But this applies for only valid XML files.


Thanks. That's nice to know for future reference.
Daylight-saving time uses more gasoline
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 7:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC