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
dipu2dipu2 

IE9 requires header in VF Page

VF Page with showHeader="false" are not working correctly in IE9. 

Looks like some of the JavaScript used in displaying the header fixes some the IE9 issues. Without the header inputText field value is not submitted to the server.

 

Please find attached my sample code below. When I uncheck the showHeader check box and enter page number 1 it takes the input. On second entry as page number 2 the value is not submitted to the server and hence the page number value is set back to 1. Now try with showHeader as checked. The page shows the tabs. Now the page number entries are sent correctly to the server. 

 

<apex:page controller="DDTestIE9" 
			showHeader="{!showHeader}">
	<apex:form id="idForm">
		<apex:outputPanel >	
			Enter the page number several times
			<br/>
			onChange action support added to the page number input field
		</apex:outputPanel>
		<br/><br/><br/>
		<apex:outputPanel >	
			<apex:outputLabel value="Show Header"></apex:outputLabel>
			<apex:inputCheckbox value="{!showHeader}">
				<apex:actionSupport event="onchange" action="{!loadPage}"/>
			</apex:inputCheckbox>
		</apex:outputPanel>
		<br/>
		<hr/>
		
		<apex:outputPanel id="idProductsBlock">
		<table><tr>
			<td width="100">
				<apex:actionStatus id="idPageChangeStatus" 
			                       startText="Loading..."
			                       stopText=""/>
			</td>
			<td >
				<apex:outputPanel >	
					<apex:outputLabel value="Page Number"></apex:outputLabel>
					<apex:inputText value="{!pageNumber}">
						<apex:actionSupport event="onchange" action="{!loadPage}" 
											rerender="idProductsBlock" 
											status="idPageChangeStatus"/>
					</apex:inputText>
				</apex:outputPanel>	
			</td>
			<td>
				<apex:outputPanel id="idLastPageNumber">
					<apex:outputLabel value="Last Page Number: "></apex:outputLabel>
					<apex:outputText value="{!pageNumber}"/>
					
				</apex:outputPanel>
			</td>
		</tr></table>
		</apex:outputPanel>	
	</apex:form>
</apex:page>

 

Here is my controller code

 

public with sharing class DDTestIE9 {
	private Integer pNumber = 0;
	
	public Boolean showHeader{get; set;}
	public DDTestIE9(){
		showHeader = true;
	}
	public Integer getPageNumber(){
		return pNumber;	
	}
	public void setPageNumber(Integer pageNumber){
		this.pNumber = pageNumber;	
		System.debug('setPageNumber = ' +pNumber);	
	}
	public void loadPage(){
		System.debug('loadPage pNumber = ' +pNumber);	
	
	}

}

 

 

 

 

spillai_Intraxspillai_Intrax

Yes, true. I face the same issue and after adding the header, things work just fine! and surprisingly in IE9.