Login box in navbar !
3 posters
Page 1 of 1
Login box in navbar !
Hi, Does anyone know how to do this?
[img][/img]
I do not know English very well, so do not jump on my mouth...
So I got this java code:
When I connect to me, I remain a button that says disconnect, please help me!
[img][/img]
I do not know English very well, so do not jump on my mouth...
So I got this java code:
- Code:
$(document).ready(function(){
var existLog = $('#logout').length;
if(existLog === 0) {
$('.headerbar').append('<form id="ddlogin" action="/login.forum" method="post">
<fieldset>
<dl>
<dd><input type="text" tabindex="1" name="username"
id="username" size="20" maxlength="40" value="Nume de utilizator" class="inputbox"
/></dd>
</dl>
<dl>
<dd><input type="password" tabindex="2" id="password"
name="password" value="Parola" size="20" maxlength="25" class="inputbox"
/></dd>
</dl>
<dl>
<dd><label for="autologin"><input type="checkbox"
name="autologin" id="autologin" tabindex="4" class="checkbox"
checked="checked" /> Remember me</label></dd>
</dl>
<dl>
<dd><input type="submit" name="login" tabindex="6" value="Conectare" class="button2" /></dd>
</dl>
</fieldset>
</form>');
}
});
When I connect to me, I remain a button that says disconnect, please help me!
Re: Login box in navbar !
There is a big error in the script... the fact that you have all those line breaks... the HTML has to be all on one line.
If you have removed the default forumotion navbar, then it will not work.
Anyway, here's a cleaned up script:
If you have removed the default forumotion navbar, then it will not work.
Anyway, here's a cleaned up script:
- Code:
$(function(){
if(!document.getElementById('logout')) {
$('.headerbar').append('<form id="ddlogin" action="/login.forum" method="post"><fieldset><dl><dd><input type="text" tabindex="1" name="username" id="username" size="20" maxlength="40" value="Nume de utilizator" class="inputbox" /></dd></dl> <dl><dd><input type="password" tabindex="2" id="password" name="password" value="Parola" size="20" maxlength="25" class="inputbox"/></dd></dl><dl><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" class="checkbox" checked="checked" />Remember me</label></dd></dl><dl><dd><input type="submit" name="login" tabindex="6" value="Conectare" class="button2" /></dd></dl></fieldset></form>');
}
});
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Login box in navbar !
Thanks for the help, but I want to stay after I connect the forum button in navbar with Disconnect
Re: Login box in navbar !
Well you need to add in the necessary code ...
Add an ELSE statement and do the same thing but instead the HTML for logout.
If you wrote that much I'm sure you know...
Unless you didn't write it...
Add an ELSE statement and do the same thing but instead the HTML for logout.
If you wrote that much I'm sure you know...
Unless you didn't write it...
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: Login box in navbar !
the manuscript was placed in CSS Or Not
moeztro4- New Member
- Posts : 17
Reputation : 1
Language : indonesia
Re: Login box in navbar !
Honestly I'm not good at Java, css, html ... If you know what I want and can help me and me
Re: Login box in navbar !
- Code:
$(function(){
if(!document.getElementById('logout')) {
$('.headerbar').append('<form id="ddlogin" action="/login.forum" method="post"><fieldset><dl><dd><input type="text" tabindex="1" name="username" id="username" size="20" maxlength="40" value="Nume de utilizator" class="inputbox" /></dd></dl> <dl><dd><input type="password" tabindex="2" id="password" name="password" value="Parola" size="20" maxlength="25" class="inputbox"/></dd></dl><dl><dd><label for="autologin"><input type="checkbox" name="autologin" id="autologin" tabindex="4" class="checkbox" checked="checked" />Remember me</label></dd></dl><dl><dd><input type="submit" name="login" tabindex="6" value="Conectare" class="button2" /></dd></dl></fieldset></form>');
}
else {
$('.headerbar').append('<a href="/logout?logout=1"><div style="border:1px solid;color:#c05;background:#e1ebf2;padding:3px 5px;">Log Out</div></a>');
}
});
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Similar topics
» Code for new PM, login/logout, etc. (navbar)
» How to creat login popup when user click to the Login button?
» Move Facebook login button to login widget.
» linking forum motion login to my site login
» Top Urgent, Help, I can login to my site, but can't login to the control panel !!
» How to creat login popup when user click to the Login button?
» Move Facebook login button to login widget.
» linking forum motion login to my site login
» Top Urgent, Help, I can login to my site, but can't login to the control panel !!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum