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.

How to bring focus to Login textbox

View previous topic View next topic Go down

Solved How to bring focus to Login textbox

Post by Ace 1 on September 8th 2015, 7:33 pm

When a user connects to my forum, how can I make focus go to the login text field?

thanks.


Last edited by Ace 1 on September 8th 2015, 11:11 pm; edited 1 time in total

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by SLGray on September 8th 2015, 7:38 pm

Could you please explain further what you want?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36705
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Ace 1 on September 8th 2015, 9:41 pm


Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Klemen on September 8th 2015, 10:07 pm

What do you mean by 'focus go to /.../'?

Klemen
Forumember

Male Posts : 292
Reputation : 32
Language : English, German, Slovene

http://www.bannedbrotherhood.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Ace 1 on September 8th 2015, 10:18 pm

For example.

Click this link.

You see how it automatically focuses to the login field?

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Ange Tuteur on September 8th 2015, 11:03 pm

Hi @Ace1,

Add the following into a script.
Modules > JS codes management > Create a new script

Placement : In all the pages
Code:
$(function() {
  var pseudo = $('input[name="username"]')[0];
  pseudo && pseudo.focus();
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Ace 1 on September 8th 2015, 11:11 pm

Thanks. -Solved

Ace 1
Helper
Helper

Male Posts : 767
Reputation : 51
Language : English - French?
Location : Druid Hill Park

http://help.forumotion.com

Back to top Go down

Solved Re: How to bring focus to Login textbox

Post by Ange Tuteur on September 8th 2015, 11:12 pm

No problem Wink

Topic archived

Have a good day.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.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