+ Start a Discussion
sfpsfp 

In Salesforce1 App how it will go to focus in another outpupanel area?

Hi All,

 I have click on the commandButton, in salesforce1 app foucs will go to the next outputpanel.

 <apex:pageBlockSectionItem >
                    <apex:outputLabel value="Testing" for="AccountLeadContact" />
                    <apex:commandButton status="saving" value="Assign..." onclick="return addAssign();" />
 </apex:pageBlockSectionItem>

Click on addAssign() method.
<div id="divid">
        <apex:outputpanel id="searchrender" >
         <apex:pageBlockSection title="Who do you want to assign this call record to..." >
                <apex:pageBlockSectionItem >
                       <apex:outputLabel id="Search">Search</apex:outputLabel>
                       <apex:panelGroup >                       
                       <apex:inputText id="searchText" style="size:10px;" value="{!searchText}" />&nbsp;&nbsp;
                        <apex:commandButton value="Go!" action="{!doSearch}" rerender="userresults" status="status"/>
                       </apex:panelGroup>
                </apex:pageBlockSectionItem>

  function addAssign() {
    $('#divid').toggle();
    $('#searchText').focus();
    $(function () {
      alert('test');
      $("#searchText").attr('tabindex', -1).focus();
    });
    
    return false;
}
 
Please help this issue.