Go Back   CodingForums.com > :: Client side development > JavaScript programming > Post a JavaScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 14 votes, 3.79 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2006, 11:22 PM   PM User | #91
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,454
Thanks: 0
Thanked 498 Times in 490 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
1. That script requires that the "protected" page have a name that is related to the password that is entered.

2. Anyone who knows the destination page can get there without having to login first.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 05-08-2006, 03:34 AM   PM User | #92
thesmart1
Regular Coder

 
thesmart1's Avatar
 
Join Date: Dec 2005
Posts: 369
Thanks: 7
Thanked 3 Times in 3 Posts
thesmart1 is an unknown quantity at this point
Love the script. Seems preety secure against most users; I don't plan on using it to secure anything important. I've been looking casually for a password gate with several user names and of all the oones I've seen, this is by far the easiest. Good job!
thesmart1 is offline   Reply With Quote
Old 05-09-2006, 07:26 PM   PM User | #93
Game_Master64
New to the CF scene

 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Game_Master64 is an unknown quantity at this point
yes, this is quite useful. problem is, i have no idea how to install it on freewebs. anyone know?
Game_Master64 is offline   Reply With Quote
Old 05-11-2006, 04:32 PM   PM User | #94
Thompson
New Coder

 
Join Date: Mar 2006
Location: São Paulo, Brazil
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Thompson is an unknown quantity at this point
Nice script. I´ve run it in a php-linux host, it goes well.

It can be incremented with some security issues, like prevent the user from reach the target page without passing through login page.

I think the most skilled crackers would check if the login and password isn´t the name of one of the pages in the server hehehe

The idea of hiding information that is passing trough fields with JScript and VBScript is quite nice, but i´ll never use it on a project, no matter how simple it is.
__________________
----
As coisas mais simples são as mais importantes.
---------
Thompson M1A1: D-Day
----------------
Thompson is offline   Reply With Quote
Old 06-18-2006, 12:40 PM   PM User | #95
Whystara
New to the CF scene

 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Whystara is an unknown quantity at this point
Smile

Hi,

I'm new to javascript & this forum, I want to use this script but am having a problem. I'm also not a html pro, but maybe you can offer advice. When I am making a custom index page with my login area, I add the code for the body into the body section of my html, but when I load the page the code for the login overrides everything else I coded before it and places the login in the upper left corner where my other code should be. Maybe this is a simple html thing, but i need help adding this script into my page. Could anyone please look at the way I have my login page set-up and tell me where to fit the body part of the script so it will work where I would like it to? Here is the address: www.starlight-myst.com/DD, you can send me an e-mail if you'd like.. to whystarasilvrain@aol.com otherwise I'll just look back in here.

Thank You!
~Whystara
Whystara is offline   Reply With Quote
Old 06-18-2006, 01:07 PM   PM User | #96
Whystara
New to the CF scene

 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Whystara is an unknown quantity at this point
Ok nevermind I figured it out LOL thanks anyway!
Whystara is offline   Reply With Quote
Old 07-21-2006, 08:33 PM   PM User | #97
thesmart1
Regular Coder

 
thesmart1's Avatar
 
Join Date: Dec 2005
Posts: 369
Thanks: 7
Thanked 3 Times in 3 Posts
thesmart1 is an unknown quantity at this point
W3Schools has great tutorials.
thesmart1 is offline   Reply With Quote
Old 08-07-2006, 10:56 PM   PM User | #98
Mike_Lamb
New Coder

 
Join Date: Aug 2006
Location: North West, England, UK
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Mike_Lamb is an unknown quantity at this point
Unhappy can't get it to work properly!!

I have placed the code within my logon site nut i cant seem to get it to work properly. It just passes me on to the blind.htm page in my site.

here is my code
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Admin Login</title>
<script type="text/javascript">
<!--
function authPass(u,p) {
	if (u && p) self.location = "blind.htm?" + u + p;
	return false;
}
// -->
</script>
Code:
<div id="Form">
<script type="text/javascript">
<!--
if (location.search.indexOf("auth=failed") != -1) {
	document.write("<span style=\"color:#ff0000\">Authorization Failed!</span>");
}
// -->
</script>
  <table width="273" border="0">
    <tr>
      <td width="267"><form id="login" action="javascript://" onSubmit="return authPass(this.user.value,this.pass.value)">
        <div align="right"><span class="TxtHead">User Name:</span>
            <input type="text" name="user">
        </div>
        <div align="right"><span class="TxtHead">Password:</span>
            <input type="password" name="pass">
        </div>
        <div align="right">
            <input type="Submit" value="Login">
        </div>
      </form></td>
    </tr>
  </table>
</div>
If any one can see what is wrong with my JScript then i would be very grateful. I have the .js file and it doesn't seem to check it help me please
Mike_Lamb is offline   Reply With Quote
Old 08-13-2006, 10:03 AM   PM User | #99
GSimpson
Regular Coder

 
GSimpson's Avatar
 
Join Date: Aug 2006
Location: New Zealand
Posts: 268
Thanks: 9
Thanked 0 Times in 0 Posts
GSimpson is an unknown quantity at this point
The vbs file created a new js file,
can you do that with js forms? thanks.
__________________
The internet is my Sandbox, and notepad is my Spade n' Bucket.
GSimpson is offline   Reply With Quote
Old 08-28-2007, 01:14 PM   PM User | #100
briand
New to the CF scene

 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
briand is an unknown quantity at this point
Is there anyway to lock the page.htm? Because if I just enter, example: www.codingforums.com/page.htm it allows me to see the page even though I not entered a username and password. Thanks for any help.

- Brian
briand is offline   Reply With Quote
Old 01-02-2008, 10:11 AM   PM User | #101
liamwis
New to the CF scene

 
Join Date: Jan 2008
Location: Barrow-in-Furness
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
liamwis is an unknown quantity at this point
Thanks borgtex. I couoldn't use php because i don't have it on my pc. This is brilliant. Everone says you can't get a secre login with javascript. but i just new you could.


THANKS BORGTEX
liamwis is offline   Reply With Quote
Old 01-02-2008, 10:15 AM   PM User | #102
liamwis
New to the CF scene

 
Join Date: Jan 2008
Location: Barrow-in-Furness
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
liamwis is an unknown quantity at this point
I think you havn't put the source of the .js file in
try doing this
<script language="text/Javascript" src="[location of the .js file"]
I hope that helps!
liamwis is offline   Reply With Quote
Old 01-02-2008, 10:29 AM   PM User | #103
liamwis
New to the CF scene

 
Join Date: Jan 2008
Location: Barrow-in-Furness
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
liamwis is an unknown quantity at this point
How do you make the Password Helper.vbs file let you have spaces and punctuation (e.g!,,). Because it dosn't!
liamwis is offline   Reply With Quote
Old 01-10-2008, 12:19 PM   PM User | #104
kosstr12
Regular Coder

 
kosstr12's Avatar
 
Join Date: Apr 2007
Location: Woodstock, Georgia
Posts: 428
Thanks: 7
Thanked 5 Times in 5 Posts
kosstr12 is on a distinguished road
Thats a great script=] one of the best on the web
kosstr12 is offline   Reply With Quote
Old 12-04-2008, 09:34 AM   PM User | #105
zoltros
New to the CF scene

 
Join Date: Dec 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
zoltros is an unknown quantity at this point
How do i change Auth.html:

var authstring = "<script type=\"text/javascript\" src=\"" + location.search.substring(1) + ".js\"><\/script>";

So that it looks for the file in a sub directory, or even a directory on another disk.??
zoltros is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:52 AM.


Advertisement
Log in to turn off these ads.