EasyUI Forum
April 28, 2024, 12:10:27 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Put the focus() on the first field of the form  (Read 1246 times)
Ariovaldo
Newbie
*
Posts: 27


Ariovaldo - São Paulo - SP


View Profile WWW Email
« on: April 08, 2023, 05:10:38 AM »

Hello,

I would like to know if there is any way to put the focus in the first available field of the form, less input hidden and less input disable.

I know how to do field by field (input by input), but I have many pages it would have to be by javascript or CSS Huh


Ari
« Last Edit: April 24, 2023, 03:47:35 AM by Ariovaldo » Logged

programming is easy, it is difficult to make programs
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: April 11, 2023, 01:32:06 AM »

Please try this code to get the first field of the form.
Code:
var f = $('#ff').find('.validatebox-text:not(:disabled):first');
f.focus();
Logged
Ariovaldo
Newbie
*
Posts: 27


Ariovaldo - São Paulo - SP


View Profile WWW Email
« Reply #2 on: April 11, 2023, 03:25:35 AM »

thank you very much
 Grin
Logged

programming is easy, it is difficult to make programs
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!