There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Simple JavaScript Login.


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
bob121's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2006
05-Jun-2007, 05:15 PM #1
Cool Simple JavaScript Login.
I would like a script when a page trys to load a java prompt pops up and requires a password and if its correct it continues loading the page and if its in correct it displays a little error message.

I was hoping you guys could help me out

Thanks James
Eriksrocks's Avatar
Computer Specs
Senior Member with 1,859 posts.
 
Join Date: Aug 2005
Location: Minnesota
Experience: Advanced
05-Jun-2007, 06:40 PM #2
It would be better to use .htaccess because a Javascript password prompt can be easily hacked by basically anyone - you just need to look at the source code.
bob121's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2006
06-Jun-2007, 11:43 AM #3
I Know
I know i can hack JavaScript Password protection, but i need a Javascript one i would normaly use other methods
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,202 posts.
 
Join Date: Oct 2006
06-Jun-2007, 02:30 PM #4
if (passwordinput.value != "password" || userinput.value != "user")
alert ("password is incorrect.");
bob121's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2006
06-Jun-2007, 04:31 PM #5
It Does Not Seem To Work
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,202 posts.
 
Join Date: Oct 2006
06-Jun-2007, 11:19 PM #6
Of course it doesn't work, you need to work on it a little.
Squashman's Avatar
Distinguished Member with 12,519 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
07-Jun-2007, 12:52 AM #7
Probably could have google searched for the answer as well.
dez_666's Avatar
Computer Specs
Senior Member with 856 posts.
 
Join Date: May 2007
Location: Kalifornya
Experience: Advanced
07-Jun-2007, 02:46 AM #8
im going to admit i have no clue what im talking about here except for .htaccess files, because i know almost z-i-p about javascript. but couldnt you use like

<script language="javascript" scr="thelogin.js"/>

or something like that thats right off the top of my head
and then just make it so nobody can get to the .js file by making file restriction thingys in your server? (easy if its apache..)

im kind of tired and its just blabber off the top of my head bear with me
bob121's Avatar
Senior Member with 172 posts.
 
Join Date: Sep 2006
07-Jun-2007, 03:00 AM #9
Well i can't do Javascript so its pretty much useless to me
dez_666's Avatar
Computer Specs
Senior Member with 856 posts.
 
Join Date: May 2007
Location: Kalifornya
Experience: Advanced
07-Jun-2007, 03:15 AM #10
oh HAH im sorry. to be honest i dont really know the difference between java and javascript...but hmm maybe it would be possible to load a java login..uh "mechanism" from another file and have THAT protected. =^_^=
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:53 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.