set focus to control

Posted by meyrick on 28-Mar-2014 02:11

I would just like to find out if there is a way to set focus to a control on page show?  

All Replies

Posted by Roger Blanchard on 28-Mar-2014 06:28

I think you can just use the following where "Input_CustomerEmail" is your control name.

Tiggzi('Input_CustomerEmail').focus();

Posted by meyrick on 28-Mar-2014 06:44

is Tiggzi the same as appery?

i tried doing:

Appery('Input_CustomerEmail').focus();

I had no success with this.

Posted by Roger Blanchard on 28-Mar-2014 06:49

I would say it is the same. It works for me but I use it in a function after the page is already shown. I am wondering if PageShow is too early to use it. It may be working but when PageShow completes it moves focus elsewhere.

Posted by meyrick on 28-Mar-2014 06:57

I was doing it on page show. How would you run the code after the page is shown?

Posted by Roger Blanchard on 28-Mar-2014 06:59

As a test I would just throw a button on the page and add a click event that would execute that JS.

Posted by meyrick on 28-Mar-2014 07:56

ok thanks. will give that a try.

Posted by meyrick on 31-Mar-2014 05:07

I am able to focus the control now using:

Appery("Input_CustomerEmail').focus();

I assumed that when I focus onto the next control the previous control would lose its focus but this has not been the case.

so I tried:

Appery("Input_CustomerEmail').blur();

but that has still not helped. have you got any ideas on how to do this?

This thread is closed