Sigma Php Ajax framework, Ajax Components, GUI Builder
February 12, 2012, 01:42:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to activate a particular input field on JSLinb application launch.  (Read 463 times)
unger
Jr. Member
**
Posts: 14


View Profile
« on: April 28, 2010, 07:48:53 AM »

I am trying to figure out how to activate() a particular input field when an application first starts. I have a dialog component that has several input fields and I want the cursor to appear in a particular field when the application is first launched. I have tried setting tabindex for each of the fields and this does control the tab order correctly but the cursor does not start out in the first field when the application containing the dialog is launched. I have also tried using onShow and onRender events on the dialog with this.input9.activate(); in them but this also does not work. 
 
After I made this post I figured out a possible way to do this. I used the afterIniComponents event of the COM (base object) in the application containing _.asyRun(function(x){x.activate();},200,[this.input10]); to activate the field. This worked. It DID NOT work if i just did the this.input10.activate(); directly in the event function. Is there a better way to do this ?
« Last Edit: April 28, 2010, 08:20:26 AM by unger » Logged
linb
Administrator
Hero Member
*****
Posts: 433


View Profile
« Reply #1 on: April 30, 2010, 05:18:02 PM »

Make sure your particular input has the min z-index in the dialog. When you call dialog.show, this input will get focus.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!