vineetu1
4th July 2005, 08:28
I have created session where there is one field with domain tcyesno

If the yes option is selected then it should display 4-5 fields below it. But if No is selected then all these fields should be hidden and the focus should be on 'continue' button.

I am able to hide the field with inputfield.invisible() function.

But I need to move the focus to 'continue' button. How can this be achieved ?

there is a function set.focus(). But for that we need to know the object_id (in long). How to get the object_id of any object on a form (like 'continue button')

suhas-mahajan
5th July 2005, 08:39
No need to take *extra* care.

Yesterday only, I made a session which is similar to your requirement.

Please find attached herewith screen-shot.

You have to write attr.input = false under before.input section in each form field.

ex.

field.loca.f:
before.input:
if ans.f = tcyesno.no then
attr.input = false
endif

Hope this helps.

Regards,

-Suhas

vineetu1
6th July 2005, 12:48
I am aware about attr.input functionality.

But what I want is how do I change the focus to the Button.

Suppose I want to change the focus without disabling the rest of the fields ?? How can it be done.

How can set.focus() be used in this case ??

*******
Hey all Gurus pls look into this query !!!!

mark_h
7th July 2005, 13:45
I do not think set.focus() can be used. As Suhas stated I do this using the attr.input field. Without the check in the before.input section what is to prevent them from going back and clicking into the field you wanted to skip. I think you still have to do the before input check so you might as well include setting attr.input.