cancel
Showing results for 
Search instead for 
Did you mean: 

how to set focus on invisible input field?

Former Member
0 Kudos

Hi Guys,

I need an invisible input field and have to set an input focus on it. My problem is that if I set input field’s property visible=blank, I get my invisible field <b>BUT</b> the function call doesn’t work (setInput.requestFocus()).

I suppose that I can’t set a focus if an input field is invisible.

Does somebody know how can I solve my problem? Is there a possibility to do this input field invisible with java script? If yes, how does it work in Web Dynpro?

Thanks

Marita

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

Setting a focus on invisible input field will not work even if you follow the method what sowjanya has suggested. The method wdThis.wdGetAPI().requestFocus() will not work for read-only and disabled fields.

By the way why do you want to set the focus on a invisible input field. If you can tell us the requirement maybe we could think of an alternate solution. But i guess for the current scenario setting focus on invisible input field does not work.

regards

ravi

Former Member
0 Kudos

What is this good for?

Armin

Former Member
0 Kudos

Matthias,

You <b>cannot</b> set focus to invisible / disabled field. In earlier versions of WD this cause JS errors, now it is probably tracked on server-side.

VS

Former Member
0 Kudos

Hi,

requestFocus() is not working when the visiblity property is blank or none.

You cannot include javascript in the webdynpro application to set focus on the input field.

Regards,

Sowjanya

Former Member
0 Kudos

Did u check with this method

requestFocus(IWDNodeElement nodeElement, IWDAttributeInfo attribute).

IWDAttributeInfo attribute

= wdContext.nodeXYZ().getNodeInfo().getAttribute(

IPrivateMyView.IXYZElement.ABC);

wdThis.wdGetAPI().requestFocus(wdContext.currentXYZElement(), attribute);

Regards,

Sowjanya