You need to sign in to do that
Don't have an account?
Long Nguyen 19
My Input TextField is readonly
I am writing a search popup that when click on the search icon , a popup dialog is opened. From there, i can search account with input text then pass value(account name, account id) back to the main window which is a textInputField
The problem is that, the textInputField in main window is not editable. Please suggest the way to fix. You can see the code below:
The problem is that, the textInputField in main window is not editable. Please suggest the way to fix. You can see the code below:
<apex:pageBlockSectionItem id="tpbsi"> <apex:outputLabel value="Account"/> <apex:outputPanel id="oppnl"> <apex:inputHidden value="{!accountId}" id="targetId"/> <apex:inputText size="40" value="{!accountName}" id="targetName" onfocus="this.blur()" disabled="false" html-readonly="false"/> <a href="#" onclick="openLookupPopup('{!$Component.targetName}', '{!$Component.targetId}')"> <apex:image id="search" url="/s.gif" styleClass="lookupIcon" onmouseover="this.className='lookupIconOn';" onmouseout="this.className='lookupIcon';" /> </a> </apex:outputPanel> </apex:pageBlockSectionItem>
Use this code
<apex:pageBlockSectionItem id="tpbsi">
<apex:outputLabel value="Account"/>
<apex:outputPanel id="oppnl">
<apex:inputHidden value="{!accountId}" id="targetId"/>
<apex:inputText size="40" value="{!accountName}" id="targetName"
disabled="false" />
<a href="#" onclick="openLookupPopup('{!$Component.targetName}', '{!$Component.targetId}')">
<apex:image id="search" url="/s.gif" styleClass="lookupIcon" onmouseover="this.className='lookupIconOn';" onmouseout="this.className='lookupIcon';" />
</a>
</apex:outputPanel>
</apex:pageBlockSectionItem>
Thanks
Nitin
All Answers
Use this code
<apex:pageBlockSectionItem id="tpbsi">
<apex:outputLabel value="Account"/>
<apex:outputPanel id="oppnl">
<apex:inputHidden value="{!accountId}" id="targetId"/>
<apex:inputText size="40" value="{!accountName}" id="targetName"
disabled="false" />
<a href="#" onclick="openLookupPopup('{!$Component.targetName}', '{!$Component.targetId}')">
<apex:image id="search" url="/s.gif" styleClass="lookupIcon" onmouseover="this.className='lookupIconOn';" onmouseout="this.className='lookupIcon';" />
</a>
</apex:outputPanel>
</apex:pageBlockSectionItem>
Thanks
Nitin
Try using below code.
Let us know if it helps you.