Discussion

1
Replies
132
Views
APAL007 Member since 2011 7 posts
Capgemini
Posted: 3 years ago
Last activity: 3 years 7 months ago

How to implement autofocus in IE v9 and above also acceptable by other browsers!

Problem Statement: As you know the autofocus does not work in IE above v9 but it works in chrome as per the supported browsers provided by Pega v7.x

Solution: To implement autofocus and consistency for browser independent behaviour. Create a custom control and while designing table/div tag supported by HTML 5 complaint, add event "onload=autofocus" and mention the below jQuery code under your script tag.

$(function() {$('[autofocus]').focus()});

Its that simple and this is how you can play with jQuery and start implementing jQuery for customer centric solution till we have it in OOTB.

Please note that, the jQuery package must be present for your application or imported for the same. Also do let me know your views on this.

***Updated by moderator: Lochan to mark post as discussion; add FAQ group tag***

User Interface Developer Knowledge Share
Share this page LinkedIn