function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDCRKSFDCRK 

BUG Urgent: actionSupport focus attribute doesn't work in IE

Hi all,
I don't know if you have faced this issue, but looks like there is a bug (don't know if it is) is Visual Force page when user hits the tab key I want to send the focus to the next field, since I am rerendering the page/pageblock/pageitems it's losing focus, but on actionSupport "onChange" event I am setting the focus to the specific field that I want i.e. Like this
 

<apex:actionsupport event="onchange" rerender="pbselected, pbsEvents, pbservices,totalprice,totalextendedamt" focus="discountvalue"/>

like this but my problem is it's working fine in FireFox, but it doesn't work in IE. Has anyone faced this issue before? and any solutions/work-arounds? please let me know. This is a critical piece any help is really appreciated.

Thanks,

Rami

 

TehNrdTehNrd
What type of component is this action associated with? Try the event="onblur"


Message Edited by TehNrd on 10-13-2008 04:29 PM
SFDCRKSFDCRK

It's associated to outputfield component.

 

thx

SFDCRKSFDCRK

sorry meant to say inputfield

 

thx

TehNrdTehNrd
Did you change the event to onblur ?
SFDCRKSFDCRK
Yes thx I did, but that didn't do the trick.
SFDCRKSFDCRK
anyone faced the above issue before? and any solution? please let me know.
 
~thx
jwetzlerjwetzler
Can you post a larger snippet of your code?  Usually when we see "actionSupport doesn't work in IE" the problem is that it is not being used correctly (It should be a child of the component you want the action to fire on).

Please use the SRC button when posting code.
SFDCRKSFDCRK

sure, pl see below... so basically the user comes to the Qty field enters the value and hits the tab key (it should go to discount value field), the page gets rendered and the cursor loses focus even with the focus attribute, but it works fine in FireFox. Basically the whole thing is under pageblocktable.

<apex:column headerValue="Qty">
<div class="requiredInput">
<div class="requiredBlock"></div>
<apex:inputField value="{!invoicesval.invoicedetail.Quantity__c}" style="width:35px">
<apex:actionsupport event="onchange" rerender="pbselected, pbsEvents, totalprice,totalextendedamt" focus="discountvalue"/>
</apex:inputField>
</div>
</apex:column>

<apex:column >
<apex:facet name="header">Discount<br/>Value</apex:facet>
<apex:inputField id="discountvalue" value="{!invoicesval.invoicedetail.DiscountValue__c}" style="width:75px">
</apex:inputField>
</apex:column>

<apex:column >
<apex:facet name="header">Discount<br/>Type</apex:facet>
<div class="requiredInput">
<div class="requiredBlock"></div>
<apex:inputField id="discounttype" value="{!invoicesval.invoicedetail.DiscountType__c}" style="width:85px">
<apex:actionsupport event="onchange" action="{!invoicesval.validateinputdata}" rerender="pbselected, pbsEvents,totalprice,totalextendedamt,msgs"/>
</apex:inputField>
</div>
</apex:column>

<apex:column >
<apex:facet name="header">Discount<br/>Price</apex:facet>
<div class="requiredBlock"></div>
<apex:outputField id="invdiscountprice" value="{!invoicesval.calculateddiscountedprice.Discounted_Price__c}" style="width:85px" rendered="true" > </apex:outputField>
<apex:actionsupport event="onchange" rerender="totalprice,totalextendedamt"></apex:actionsupport>
</apex:column>

<apex:column >
<apex:facet name="header">Discount<br/>Percent</apex:facet>
<apex:outputField id="invdiscountpercent" value="{!invoicesval.calculateddiscount.Discount__c}" style="width:40px"> </apex:outputField>
<apex:actionsupport event="onchange" rerender="totalprice,totalextendedamt"></apex:actionsupport>
</apex:column>

<apex:column >
<apex:facet name="header">Extended<br/>Amount</apex:facet>
<apex:outputField id="totalprice" value="{!invoicesval.totalPrice.Extended_Amt__c}" style="width:85px"/>
<apex:actionsupport event="onchange" rerender="totalextendedamt"></apex:actionsupport>
</apex:column>

SFDCRKSFDCRK

sorry I didn't post code using SRC button, but any update anyone in this issue...

Code:
                    <apex:column headerValue="Qty">
                        <div class="requiredInput">
                            <div class="requiredBlock"></div>
                        <apex:inputField value="{!invoicesval.invoicedetail.Quantity__c}" style="width:35px">
                         <apex:actionsupport event="onchange" rerender="pbselected, pbsEvents, totalprice,totalextendedamt" focus="discountvalue"/>
                        </apex:inputField>
                        </div>
                    </apex:column> 
                                        
                    <apex:column >
                        <apex:facet name="header">Discount<br/>Value</apex:facet>
                          <apex:inputField id="discountvalue" value="{!invoicesval.invoicedetail.DiscountValue__c}" style="width:75px">                                                                     
                          </apex:inputField>
                    </apex:column>     
                    
                    <apex:column >
                        <apex:facet name="header">Discount<br/>Type</apex:facet>
      <div class="requiredInput">
                        <div class="requiredBlock"></div>                        
                         <apex:inputField id="discounttype" value="{!invoicesval.invoicedetail.DiscountType__c}" style="width:85px">    
       <apex:actionsupport event="onchange" action="{!invoicesval.validateinputdata}" rerender="pbselected, pbsEvents,totalprice,totalextendedamt,msgs"/>       
                        </apex:inputField>
                        </div>
                    </apex:column>                                      
                    
                    <apex:column >
                        <apex:facet name="header">Discount<br/>Price</apex:facet>
                            <div class="requiredBlock"></div>
                        <apex:outputField id="invdiscountprice" value="{!invoicesval.calculateddiscountedprice.Discounted_Price__c}" style="width:85px" rendered="true" > </apex:outputField>
                        <apex:actionsupport event="onchange" rerender="totalprice,totalextendedamt"></apex:actionsupport>                                                       
                    </apex:column>

                    <apex:column >
                        <apex:facet name="header">Discount<br/>Percent</apex:facet>
                        <apex:outputField id="invdiscountpercent" value="{!invoicesval.calculateddiscount.Discount__c}" style="width:40px"> </apex:outputField>
                        <apex:actionsupport event="onchange" rerender="totalprice,totalextendedamt"></apex:actionsupport>
                    </apex:column>          
                              
                    <apex:column >
                    <apex:facet name="header">Extended<br/>Amount</apex:facet>
                        <apex:outputField id="totalprice" value="{!invoicesval.totalPrice.Extended_Amt__c}" style="width:85px"/>
                        <apex:actionsupport event="onchange" rerender="totalextendedamt"></apex:actionsupport>
                    </apex:column>
                    
                    <apex:column headerValue="Notes">
                        <apex:inputText value="{!invoicesval.invoicedetail.Notes__c}" style="width:85px"/>
                    </apex:column>
                    
                    <apex:column >
                    <apex:facet name="header">Source<br/>Type</apex:facet>
                        <div class="requiredInput">
                        <div class="requiredBlock"></div>
                     <apex:inputField id="sourcetype" value="{!invoicesval.invoicedetail.Source_Type__c}" style="width:85px">               
      <apex:actionsupport event="onchange" rerender="pbselected, pbsEvents"/> 
      </apex:inputField>
      </div>
                    </apex:column>
                    
                    <apex:column headerValue="Source">
                        <div class="requiredInput">
                            <div class="requiredBlock"></div>
                            <apex:inputField id="invproductsource" value="{!invoicesval.invoicedetail.Source__c}" rendered="{!IF((invoicesval.invoicedetail.Source_Type__c='CNN'),false,true)}" styleclass="dim_b">
                            </apex:inputField>
                            </div>
                    </apex:column>
                            
                    <apex:column >
      <div class="requiredInput">
                           <div class="requiredBlock"></div>                    
                        <apex:facet name="header">Revenue<br/>Share %</apex:facet>
                        <apex:inputField id="invrevenueshare" value="{!invoicesval.invoicedetail.Rev_Share__c}" rendered="{!IF((invoicesval.invoicedetail.Source_Type__c='CNN'),false,true)}" styleclass="dim_b"/>
                        </div>
                    </apex:column>     
                                               
                    <apex:column >
      <div class="requiredInput">
                         <div class="requiredBlock"></div>                    
                        <apex:facet name="header">Video<br/>Description</apex:facet>
                        <apex:inputField id="invvideodescription" value="{!invoicesval.invoicedetail.Video_Description__c}" rendered="{!IF((invoicesval.invoicedetail.Source_Type__c='CNN'),false,true)}" styleclass="dim_b"/> 
                        </div>
                    </apex:column>  

                                    
                </apex:pageBlockTable>
               </apex:pageblocksection>
               
            <apex:pageblocksection >       
                    <apex:pageblocksectionItem >

                    </apex:pageblocksectionItem>
                    
                                           
                   <apex:pageblocksectionItem >
                        <apex:outputLabel value="Total Amount" for="totalextendedamt" style="font-weight:bold"/>
                        <apex:outputField id="totalextendedamt" value="{!totalExtendedPrice.totalinvoicedamt_del__c}"/>
                    </apex:pageblocksectionItem>
            </apex:pageBlockSection>
            
               <br> <br>


 

BrianWKBrianWK

SFCRK,

 

Did you ever get your actionsupport to fire on the inputfield?

 

I'm currently trying to get mine to work with an Inputfield of a currency field. So far I've tried onclick, onchange, onblur, onfocus, and onselect. Nothing seemed to ever happen. Just to make sure it wasn't a mistake with a re-render I even put a status on just to see if the status ever fires (it doesn't).

 

I'm interested in knowing what your solution was.

devfredevfre

hi, for me also the focus attribute is not working.. did you get the solution> if so pls suggest what to do?

RossCo@DiscoveryRossCo@Discovery

Hi

 

I am also having this isue. The focus attribute is not been respected and without it an inputfield elsewhere on the page is getting the focus after the actionsupport call.

 

Help !

 

Many thanks

Ross