CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

iwcgjqdropdown and set focus

General discussion

by hsbelli72 » 20 May 2014 13:26

hi, i have this problem.. have 2 iwcgjqdropdown components. i need when press ENTER key in first iwcgjqdropdown go to focus a second iwcgjqdropdown.
use a onkeydown.condition='e.keyCode==13' and in onevent put the code camara.setfocus; (camara is the name of second iwcgjqdropdown) but nothing do.
with others components like iwcgjqedit run ok.

can helpme please!..

regards.
hsbelli72
 
Posts: 297
Joined: 14 Mar 2013 18:10

by Jorge Sousa » 20 May 2014 14:06

Hello

I think you should use e.which==13, which is cross-browser in HTML5
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by hsbelli72 » 20 May 2014 15:01

hi, use e.which==13 in onkeydown and onkeypress events and have the same problem.. nothing do..

regards.
hsbelli72
 
Posts: 297
Joined: 14 Mar 2013 18:10

by Alexander Bulei » 20 May 2014 15:06

Hi hsbelli72,

To set the focus on JQDropDown, you need this:

delphi code
Format('%s.data("select2").selection.focus();',[CGGetJQuery(IWCGJQDropDown1.JQHTMLName)])


Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by hsbelli72 » 20 May 2014 22:04

hi, thanks for this help.. but in which event put this code?.

regards.
hsbelli72
 
Posts: 297
Joined: 14 Mar 2013 18:10

by Jorge Sousa » 20 May 2014 22:48

instead of SetFocus you call

CGAddJavaScriptToAjaxResponse(Format('%s.data("select2").selection.focus();',[CGGetJQuery(IWCGJQDropDown1.JQHTMLName)]))
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to General - Archive

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.