Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Login button - multiple clicks

Questions related to customising nuBuilder Forte with JavaScript or PHP.
Post Reply
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Login button - multiple clicks

Unread post by Janusz »

Hi,
If on the login screen (after entering login and password) someone is making multiple cliks on the login buton - then few session is opened in the nuBuilder.
This probably can be prevented in nucommon.js file by modifying nuLogin function specifically the code for buton:

Code: Select all

<input id='submit' type='button' class='nuButton'  style='margin:20px 0px 0px 50px;width:90px;height:30px;' onclick='nuLoginRequest()' value='Log in'/>
Do you have any suggestion how to modify this code to disable that buton/action lets say for 1 sec to prevent sending multiple login requests?
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: Login button - multiple clicks

Unread post by Janusz »

after check the following code works OK inside the html onclick function:

Code: Select all

field=this.id;nuDisable(field);nuLoginRequest();setTimeout(function(){nuEnable(field);},2000);
If you like nuBuilder, please leave a review on SourceForge
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: Login button - multiple clicks

Unread post by kev1n »

Thanks for sharing - works great!
admin
Site Admin
Posts: 2822
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 29 times

Re: Login button - multiple clicks

Unread post by admin »

.
Post Reply