home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Jave help with the (if) string

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1472
Discussions: 200,930, Posts: 2,379,155, Members: 246,297
Old January 7th, 2004, 04:46 PM   Digg it!   #1 (permalink)
Registered User
 
Join Date: Jan 2004
Location: UK Manchester
Posts: 24
Question
Jave help with the (if) string

I am using the below * part of script *

} if (usercode==115604600&&passcode==115604600);}

window.location=password+".htm"}

else
{
alert("password/username wrong")}

where the 115604600 are encrypted for user name and password

this works fine if only one user....

How do I add a string that will allow the if function to check against a second user and password ?

full origional script can be seen at http://www.dynamicdrive.com/dynamicindex9/password.htm

I want to use this but have it check more that one name and password

any one help?? or tell me a better script to check users and passwords before sending them to the page that relates to them?

Thanks the rave
Therave is offline   Reply With Quote
Old January 7th, 2004, 07:47 PM     #2 (permalink)
Registered User
 
Join Date: Jan 2004
Location: UK Manchester
Posts: 24
well got no help but for anyone reading

I managed to find this http://www.geocities.com/SiliconVall...w/conteng.html

and it worked a treat... however if there is any people with more knowledge than me a novice could look at the .class files and tell me if there is anything dodgg written in the scripts that might be sending information to places other than where ist intended.

appreciated in advance.
Therave is offline   Reply With Quote
Old January 8th, 2004, 09:45 PM     #3 (permalink)
Member
 
Join Date: Sep 2002
Posts: 364
I don't understand if this is for JavaScript or Java. Your first link is js, and the second looks likes its for a Java Applet. I don't use javascript much, but for regular java, you make a method has is called with two parameters passed in, and you check those variables against your values.
Creosote is offline   Reply With Quote
Old January 8th, 2004, 09:53 PM     #4 (permalink)
Registered User
 
Join Date: Jan 2004
Location: UK Manchester
Posts: 24
got the crap above sorted... just need to work on how .htaccess works so anyone accessing a folder using a direct link cant have access unless they have come from my login page

can anyone help with .htaccess

have a folder called /private with a login page that directs to subfolders in private eg /private/images

I want any folder in the /private/images folder to return an error on page unless its come from the login page

am i making sense???

the rave
Therave is offline   Reply With Quote
Old January 12th, 2004, 12:50 PM     #5 (permalink)
Senior Member
 
Join Date: Oct 2001
Location: New Hampshire, USA
Posts: 641
Don't ask me how to do this, but have you considered having a successful login create an object with a property value you can check prior to opening a linked web page? If the individual browsing the web does not log in, then they would not have an instance of the "LoginSuccessfullyAuthenticated" object to check prior to loading a web page. You could store this object in memory and know that upon reboot it would be destroyed. Alternately you could build in a "time bomb" of sorts into the instance of the object that would destroy the "LoginSuccessfullyAuthenticated" object after a predetermined time interval.

Another method (less sophisticated) would be to create a cookie upon a successful login. This cookie could then be checked prior to loading specific web pages stored upon your site.

Hope this helps.

Last edited by ctaylor : January 12th, 2004 at 12:52 PM.
ctaylor is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (2870)
Obama the Muslim (14)
California Passes Anti-Flat-HDTV Le.. (39)
Is the PSU I received dead? (10)
windows vista security holes (9)
HIS HD5770 graphic card question (15)
Print spooler problem (13)
Foreign voltage (10)
Install XP pro and a Vista laptop ?.. (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
A good PSU? (10)
Ideal cheap graph card for PC-Gamin.. (16)
New Computer wont recognize XP disc (7)
EVGA 9800 gtx help with finding a g.. (8)
Recent Discussions
Partition Magic caused HDD problem (2)
Graphics Card Upgrade Question (1)
favorit (1)
solutions for virtical white lines on.. (1)
Regular Build (3)
Ideal cheap graph card for PC-Gaming? (16)
Fire in DVD (2)
Modern Warfare For the PC (33)
radeon x850xt platinum & shader 3 (3)
Have you switched yet? (84)
Install XP pro and a Vista laptop ?? (10)
Wireless Router+Cable Modems and Much.. (0)
Optical Audio A-B Switch (1)
windows vista security holes (9)
The NTDVM CPU has encountered an ille.. (24)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (34)
Wireless speakers for PC? (11)
Print spooler problem (13)
Help getting around port 80 for camer.. (2)
Display shows 3x5 inch in middle of s.. (3)
monitor will not turn on at all, (1)
World's largest Monopoly Game using G.. (331)
Foreign voltage (10)
FiOS modem/router interfering with ne.. (7)
Browsers wont load websites (2)


All times are GMT -4. The time now is 06:55 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28