|
|
|
|
![]() ![]() |
Feb 6 2005, 07:25 AM
Post
#1
|
|
|
**removed link** ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 180 Joined: 21-July 04 From: I Don't Know Member No.: 162 |
I travel alot so I get a chance to catch up on my reading. I bought a book today about javascripts. I hope this will help me in creating my site which is currently being worked on. I want my site to look professional and effective. I am hoping that this will help in creating this. Next I plan on learning PHP, but since php is harder I will learn this first. I am a fast reader and I hope that I can learn this fast since having a site down for a long time looks bad on the owner.
One reason I want to learn Javascript is to protect my site. I want to add a username and passoword protection page to my site that I can use to talk to my members with and allow them access to certain parts of the site that you will not find to entered correctly. Javascript has a lot to offer and I can't wait to learn more about what all it can do. Well got to go. The more time on here the less I can read. Thanks Eric Drinkard * Please note that all suggestions are welcome and I would like to thank any one who helps me. |
|
|
|
Feb 6 2005, 11:05 AM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 5-February 05 From: london Member No.: 3,615 |
well use php if you want password protected areas its easyer to setup and its better than javascript!
|
|
|
|
Feb 6 2005, 01:09 PM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 378 Joined: 8-January 05 Member No.: 3,174 |
First: Java is not JavaScript.
You use Java for programming, you will need to compile Java code. JavaScript is a scripting language, most used for clients-ide scripting in webpages. If you want to password-protect things on your website, you really have to use something server-side, either PHP (or similar) or HTTP authentication. JavaScript won't help you protect things. I wish you the best of luck in whatever you want to learn, but if you bought a book about JavaScript, you won't learn any Java, or anything to password protect your site. Edit: Please note that JavaScript can be very useful when building websites. |
|
|
|
Feb 6 2005, 07:36 PM
Post
#4
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 29 Joined: 6-February 05 From: Houston, Texas Member No.: 3,634 |
I partly agree with bjrn that javascript will not help you with website protection much but it's not totally true that you can't password protect your site with javascript. Because you can make a script to ask for the password before letting someone access it. But there are several flaws:
1) People can still look at the source of the page and find the password. 2) If they can't find the password they can always save the page on their comp and then delete the script from the source. 3) People will always be able to see your souce unless you scramble it) 4) If you scramble your souce than you won't be able to edit that site unless you have a backup of that site, edit it, scramble it, and replace the old site with the new site. So I suggest using PHP because PHP is not coded directly into the the source. Which means it would protect your site a lot better than java script. One last thing. bjrn said that Java is for programming and Javascript is a scripting language. That's not true. You can use both Java and Javascript as a programming language. But you can't use java as a scripting language (correct me if i am wrong). |
|
|
|
Feb 26 2005, 03:32 AM
Post
#5
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
I'm pretty sure you can't use Java for scripting, but I'm new to it (started attempting to teach myself through tutorials this week). You can embed Java applets in web pages and do some pretty neat things, though.
And if you're going to have a protected part of your site with users and whatnot, PHP is definitely the best. Since it does it's stuff before you load the page (or before you reload, depending on what it's doing), you can't see it in the source. The only way to look at the PHP is if you're on a system with a bunch of users. For example, my school gives us a little bit of webspace with PHP hosted on a UNIX/Linux server and since we can SSH into it, anyone that has the right permissions can go through and look at it in VI. However, I don't think many hosts really do that so PHP is best if you want to have authentication. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th October 2008 - 11:35 AM |