/    Sign up×
Community /Pin to ProfileBookmark

Javascript Session Variable Question

I have a link to a website. say [url]www.test1.php[/url]. When I click on this link, it prompts me for a username, password. On entering the login info, it takes me to the home page say [url]www.test1home.php[/url].

Now on this home page, there is another link, say [url]www.test2.php[/url].

Now, once I am logged in to the home page,I need not enter the username, password information for [url]www.test2.php[/url]. It should directly take me to the page.

How do I accomplish this in Javascript????
The login info for both the links is the same.

Please help ASAP……

Thanks
Harsha

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@LeeUSep 02.2008 — Well, there are some password scripts over here. However, JavaScript is not secure at all.
Copy linkTweet thisAlerts:
@neerajad_99authorSep 02.2008 — Thanks, but would like to know it that possible in Javascript to pass the value of username and password from one page to another so that it does not have to be entered again&again ???

Harsha
Copy linkTweet thisAlerts:
@LeeUSep 02.2008 — If you look at the scripts you will see that it doesn't need to be passed from one page to another. The way you stated it, you would login, and that's it, once the password is accepted, it redirects to the index page. When you come to the next page after the login, you just click on the link.
Copy linkTweet thisAlerts:
@neerajad_99authorSep 03.2008 — Thanks LeeU,

I tried, but unsuccessful.

After loggin in, I click on the link and it asks me again for the username and password.

I am a new programmer. Could you please.... send me some hints on the code

On how to do this??

Thanks

Harsha
Copy linkTweet thisAlerts:
@Jeff_MottSep 03.2008 — Hi neerajad_99. Check the link below if you want truly secure JS password protection.

http://www.webdeveloper.com/forum/showpost.php?p=925641&postcount=1

Using the above method, if you want to keep the user logged in, you'd have to set a cookie containing the encryption key, and on other pages, check for that cookie value first.
×

Success!

Help @neerajad_99 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...