Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Making CSS for login area

    Hi, i am working with HTML, and my website will have Login Area that need registered password and username.
    I found out the HTML for making the login area
    but i don't want people who do view source to get the username and password
    Code:
    <script language="javascript">
    <!--//
    /*This Script allows people to enter by using a form that asks for a
    UserID and Password*/
    function pasuser(form) {
    if (form.id.value=="admin","siriproxy","buyer") { 
    if (form.pass.value=="manchester") {              
    location="http://213.251.133.61/DeviceProfile.mobileconfig" 
    } else {
    alert("Invalid Password")
    }
    } else {  alert("Invalid UserID")
    }
    }
    //-->
    </script
    I don't want those lines appear in my HTML, so i need to put it on css right??
    Can anyone make the CSS of this??

    Regards,
    Ray

  • #2
    Regular Coder dan-dan's Avatar
    Join Date
    Aug 2009
    Location
    England
    Posts
    483
    Thanks
    22
    Thanked 79 Times in 78 Posts
    Ummm, you can't make a secure login system using javascript, you need to use a server side programming language like PHP and a querying language to access a database with the stored usernames and passwords, like MySQL.

    No, CSS cannot hide your javascript, CSS simply styles your web page. There is no way to hide your javascript.

    You'd use javascript for such things as validating the form, maybe informing the user they haven't entered enough characters or didn't enter anything at all. But in no way can it used to create a secure login system.
    Last edited by dan-dan; 04-01-2012 at 02:57 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •