The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Login on click function Js

View previous topic View next topic Go down

Solved Login on click function Js

Post by Dark_Code on July 3rd 2012, 3:53 am

Ok I wanna know how to make a Login function like for an example when I click Login it popup's a Login box and I know it is CSS and JS but I Don't know anything about JS so can someone just post it here.

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 5:01 am

How did you this on your site


Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by +Fusion- on July 3rd 2012, 7:44 am

i would like to know this as well

+Fusion-
Forumember

Male Posts : 252
Reputation : 4
Language : English
Location : Flying

http://www.xcodezz.com

Back to top Go down

Solved Re: Login on click function Js

Post by LGforum on July 3rd 2012, 11:12 am

You have to create yourself a log in form. Add into templates or announcement of something, then just make it popup on click like Rideem showed.

LGforum
Hyperactive

Male Posts : 2254
Reputation : 254
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 2:00 pm

Heres a code you can use on an HTML page or anywhere that allows HTML. I have this on my home page. Just copy and paste this code to an HTML document. You can change the colors to your liking. Its in a spoiler code which I thought of and works like a pop-out. If you want to see it in action click my forum icon under my profile and on that page click "Login" and you'll see how it looks and works. Of course you don't have to actually login but you will see what it looks like. It works great. I tested it on IE, Firefox, and Chrome browsers just to be absolutely sure it works on all of them, and it does. No reason why it wouldn't but I like to see it for myself anyway. Oh, and turn up your volume. Smile

You'll need to add your forum url login page to this code where it says to. Your forum login page url will end in /login.

Code:
<a href="#" onclick="if(document.getElementById('spoiler') .style.display=='none') {document.getElementById('spoiler') .style.display=''}else{document.getElementById('spoiler') .style.display='none'}"/>Login</a>


<div id="spoiler" style="display:none">
<br><br>
<form action="YOUR FORUM URL LOGIN PAGE GOES HERE" method="post"><table bgcolor="#262627" cellspacing="1" cellpadding="3" border="2" bordercolor="#1E90FF"><tbody><tr><td width="45%" align="right"><font face="verdana" color="#ADADAD" size="2"> Username:</td><td><input type="text" name="username" size="25" maxlength="40" /></td></tr><tr><td align="right"><font face="verdana"  color="#ADADAD" size="2">Password:</td><td><input type="password" name="password" size="25" maxlength="32" /></td></tr><tr align="center"><td colspan="2"><font face="verdana"  color="#ADADAD" size="2">Log me on automatically each visit: <input type="checkbox" name="autologin" checked="true" /></td></tr><tr align="center"><td colspan="2"><input type="submit" class="mainoption" name="login" value="Log in" /><input name="redirect" type="hidden" value="/h5-loading-page"/></td></tr></tbody></table></form></font>
</div>

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 7:59 pm

runawayhorses that's what i want but I DONT want to appear at the bottom when you click Login it fades in the center

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:07 pm

Not on my browsers it doesn't.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:11 pm

Know that's what I want it to do just like Fancy box but with Java Script

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:14 pm

Are you talking about when you click 'my' Login link it shows up at the bottom of the page and fades in the center? What do you mean by fades in the center?

If you are talking about when you added the code to your page then the reason would be because you have to add alignment tags. Which do you mean my Login or yours?

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:17 pm

when you on Rideem3 site then when you click Login it appears in the center and it fades in when you click Login

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:19 pm

What happened when you clicked my Login link?

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:22 pm

oh ok I want it in the center with this code runawayhorses gave me

I don't want it at the bottom I want it in center

Code:

<a href="#" onclick="if(document.getElementById('spoiler') .style.display=='none') {document.getElementById('spoiler') .style.display=''}else{document.getElementById('spoiler') .style.display='none'}"/>Login</a>
<div id="spoiler" style="display:none">
<br><br>
<form action="YOUR FORUM URL LOGIN PAGE GOES HERE" method="post"><table bgcolor="#262627" cellspacing="1" cellpadding="3" border="2" bordercolor="#1E90FF"><tbody><tr><td width="45%" align="right"><font face="verdana" color="#ADADAD" size="2"> Username:</td><td><input type="text" name="username" size="25" maxlength="40" /></td></tr><tr><td align="right"><font face="verdana"  color="#ADADAD" size="2">Password:</td><td><input type="password" name="password" size="25" maxlength="32" /></td></tr><tr align="center"><td colspan="2"><font face="verdana"  color="#ADADAD" size="2">Log me on automatically each visit: <input type="checkbox" name="autologin" checked="true" /></td></tr><tr align="center"><td colspan="2"><input type="submit" class="mainoption" name="login" value="Log in" /><input name="redirect" type="hidden" value="/h5-loading-page"/></td></tr></tbody></table></form></font>
</div>

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:23 pm

You have to use alignment tags.

Where are you adding the code?

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:25 pm

In the homepage messages but I was just testing it but im gonna put it in the Templates

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:28 pm

Put this at the beginning of all the code:

Code:
<center>

And this at the end of all the code:

Code:
</center>

Now do me a favor and tell me what happens when you click my Login link. Where does the login box appear to you?

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:31 pm

The Login box is in the center

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:39 pm

Well I go by the idea if it ain't broke don't fix it.. Smile

I got that code from a link LG posted when he was helping someone else awhile back, he said if you want a simple login that code would work. So I tried it and it works. All I did to it is put it in a spoiler.

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by runawayhorses on July 3rd 2012, 8:44 pm

OK thanks, that's cool. By the way when you click my Login link where does the box appear to you? thanks

runawayhorses
Hyperactive

Male Posts : 2537
Reputation : 162
Language : English
Location : United States

http://runawayhorses.alldiscussion.net/

Back to top Go down

Solved Re: Login on click function Js

Post by Dark_Code on July 3rd 2012, 8:44 pm

Can someone locked this, It's done Im just gonna code it more

Dark_Code
Forumember

Male Posts : 91
Reputation : 4
Language : CSS
Location : Modesto

http://csshelp.ipbhost.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum