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 8 of 8
  1. #1
    New Coder
    Join Date
    Jul 2005
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Login Scripts.........

    is there javascript/html login scripts? i know there is php but i dont want to bother with that. i know u can make protected pages but im taking about login scripts.

  • #2
    Regular Coder Ranger56's Avatar
    Join Date
    Mar 2005
    Location
    Kent, WA.
    Posts
    783
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, PHP is the way to go becuase javascript passwords can be very easily found out, you just need to view the source of the page/.js file and it says the password right in it.

  • #3
    New Coder
    Join Date
    Apr 2005
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Short answer: No.

  • #4
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, there is, though as said before not secure...

    JavaScript Code in the HEAD
    Code:
    <script language="Javascript">
    function click() {
    if (event.button==2) {
    alert('You have performed an illegal operation. \n\Err. #37048932');
    
    //Message shows when right-clicked(Block source)
    //Delete When Using code
    
    }
    }
    document.onmousedown=click
    
    function login() {
    var sidewayz='memberhome.html'
    var nathan='memberhome.html'
    
    //set the hompages for the members
    //Delete When Using code
    
    var nouser='right.html'
    var nopwd='right.html'
    
    //set the hompages for when no pass or no username
    //Delete this code when Using code
    
    var neither='neither.htm'
    var user = document.log.user.value;
    var pass = document.log.pass.value;
    
    if (user=="sidewayz" &&  pass=="drift") { 
    alert('Acess Granted!\n\nWelcome Message For Alert!');window.location=sidewayz
    
    //verify User name and passwords
    //Delete When Using code
    
    } else if (user=="nathan" && pass=="permit") { 
    alert('Acess Granted!\n\'nAcess Granted!\n\nWelcome Message For Alert!'); window.location=nathan
    } else {
    alert('Sorry,\n\nyou are not a member!');
    
    //if no password or incorrect
    //Delete When Using code
    
    }
    }
    </script>
    and the form

    HTML Code in the BODY
    Code:
    <FORM name="log">
    <font size="2" face=times>
    Username:
    <input type="text" name="user" size="10" onBlur = "set_name(this.form)">
    <font size="2" face=times>
    Password:
    <input type="password" name="pass" size="10">
    <center>
    <input name="Submit" type=button  value="Log In" onClick="login()" size="10" onmouseover="window.status='Click To Log In'; return true" onmouseout="window.status='Thankyou for visiting';return true;">
    </font>
    </center>
    </FORM>

    I took this straight from my site and cut out most of my codes, although i may have missed a bit

  • #5
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As you see the security is crap! There's no other safe way then protecting pages with .htaccess.
    CATdude about IE6: "All your box-model are belong to us"

  • #6
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes they are right, with my code, and the right click blocker is the safest way. And to stop the view source thing through the top option you would put the whole page in a frame, so it shows the frame setters code and not the actual page... get me?

  • #7
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    Why don't you want to go down the PHP road?

  • #8
    New Coder
    Join Date
    Jun 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah, i thought that, and then i remembered maybe he has a free server, and the good ones with text ads(small) dont allow php. Which is the reaSOn i did that for my site,but now im trying to get cgi and have a seperate account with tripod which allow it and ill parse stuff through that directory


  •  

    Posting Permissions

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