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
nishad basha 7nishad basha 7 

how to display the given input field values in same visualforce page?

User-added image
Best Answer chosen by nishad basha 7
RishavRishav
Hii Nishad, 
According to your question i tried to solve ur problem with <apex:actionSupport>.
It's working fine for me , check it out .
<apex:page controller="renderOnInputController">
   
   <apex:form >
            
        <apex:outputPanel id="counter">
           <apex:inputText value="{!myText}"/> <br/>
          <apex:outputText value="{!myText}"></apex:outputText> <br/>
              <apex:actionSupport event="onkeyup" 
                                action="{!changeValue}" 
                                rerender="counter" status="counterStatus"/>
        </apex:outputPanel>
        <apex:actionStatus id="counterStatus" 
                           startText=" (rendering...)" 
                           stopText=" Done?"/>
    </apex:form>
</apex:page>
public with sharing class renderOnInputController {
  public String myText{get;set;}
   string mText{get;set;}
                        
    
    
    public void changeValue(){
       mText= myText;
         
    }
                    
    public String getCount() {
        //return count;
        return mText;
    }
}

 Hope it helps u. 
 If ur problem solved then please close this thread by marking the best answer. It will help others too.

Thanks
Rishav
 

All Answers

Nishant SharmaNishant Sharma
Put this script in your page
 
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js'></script>

<script>
	
	$('#TEXT_FIELD_ID').change(function(){
		
		$('#DIV_ID').html('The entered text is ' + this.value);
	})
	
</script>

 
nishad basha 7nishad basha 7
ur requirement is not displaying . is  it possible to run this requirement on  visualforce components
Nishant SharmaNishant Sharma
Yes, it will work in vf component.
nishad basha 7nishad basha 7
but my question is <apex:action support component  i need this examples. please give some ideas
RishavRishav
Hii Nishad, 
According to your question i tried to solve ur problem with <apex:actionSupport>.
It's working fine for me , check it out .
<apex:page controller="renderOnInputController">
   
   <apex:form >
            
        <apex:outputPanel id="counter">
           <apex:inputText value="{!myText}"/> <br/>
          <apex:outputText value="{!myText}"></apex:outputText> <br/>
              <apex:actionSupport event="onkeyup" 
                                action="{!changeValue}" 
                                rerender="counter" status="counterStatus"/>
        </apex:outputPanel>
        <apex:actionStatus id="counterStatus" 
                           startText=" (rendering...)" 
                           stopText=" Done?"/>
    </apex:form>
</apex:page>
public with sharing class renderOnInputController {
  public String myText{get;set;}
   string mText{get;set;}
                        
    
    
    public void changeValue(){
       mText= myText;
         
    }
                    
    public String getCount() {
        //return count;
        return mText;
    }
}

 Hope it helps u. 
 If ur problem solved then please close this thread by marking the best answer. It will help others too.

Thanks
Rishav
 
This was selected as the best answer
nishad basha 7nishad basha 7
Hi
Rishav

is it possible how to use <apex:action region component in that above scenario.please give me the ideas with examples
nishad basha 7nishad basha 7
Hi Nishant Sharma,


is it possible how to use <apex:action region component in that above scenario.please give me the ideas with examples