/    Sign up×
Community /Pin to ProfileBookmark

HELP! Multiple login buttons on 1 page?

Hi there… got a strange dilemma. I think. lol

#1 – I can’t write java.. I rely of the kindness of geniuses who can.

#2 – I know how to use the scripts I need.. and even alter them slightly when needed.. so I’m not totally ignorant. ?

Here’s what happened:

I have a main web page I created for someone. He needs a small handful of folks to be able to login with user/pw on that page to gain access to another page. I found the ‘perfect’ simple script to create a login button and prompt for user/pw, etc. It works fine. Not worried about ‘security’ here for these particular folks, and I already scripted the page for ‘no right click’ also. No gov’t secrets or anything. LOL

Now… there’s a ‘2nd level’ of folks who need to access a *different* page in the series, who will be taken to a 2nd page. So..I thought: Why not put both buttons on the same page.. labeled differently, of course. Here’s the weird part. It actually worked when I showed it to him! ?

The first/original script read ‘form=password1’… so I changed the second instance of the script to read ‘form=password2’.. and that seemed to work.

Now it does not. It automatically goes to the 2nd page right off now.

My question. Is there any reason why I can’t have 2 copies of the script on the same page?? Is there some way of ‘separating’ the 2 scripts on the page so that they don’t ‘see’ each other?

Ok.. that’s a couple questions. Sorry.. but I need to resolve this asap.. without alot of doo-wop with .htaccess, etc. Mainly cuz I don’t know how. LOL Thanks so much!!

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@BrnerJul 22.2004 — Not an expert here either but would an opening frames page work for this? One login box on each frame.
Copy linkTweet thisAlerts:
@sillyeagleauthorJul 22.2004 — Hmmm... I'm thinkin'.. I'm thinkin....

Right now.. the page is very simply 'tabled'... mainly because I hate frames.. but I suppose I could try this. Thanks for the response! It's one idea for sure.. ?
Copy linkTweet thisAlerts:
@sillyeagleauthorJul 23.2004 — Ha! GOT IT! It was so unbelievably simple that I can't stand it. TOLD you I didn't know anything about writing javascript!

A coworker who does took one look at my web source and said: it's 2 of the same script calling the same function. Rename the 2nd function. And BANG! Works like a charm! LOL I'm sooo excited... here's the line that was giving me trouble:

<form><input type=button value="Login!" onClick="LogIn()"></form>

It said the same thing in both places... all I did was add a '2' and voila! Success!

<form><input type=button value="Login!" onClick="LogIn2()"></form>

Thanks for your help. Sure beat sitting up all night with this. LOL :rolleyes:
×

Success!

Help @sillyeagle 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.19,
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,
)...