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

difference between Javascript display and Actionsupport Rerender


Can someone please tell me what is the difference between displaying a filed using
a) Javascrip:
    document.getElementById('{!$Component.filed}').style.display = 'block'; (When a condition is met, changing the display from none to block)
b) Actionsupport:
Using Rerender to display a panel/field when an event occurs. 
Suraj TripathiSuraj Tripathi
Hi Anil,

1: In The display property sets or returns the element's display type.
The display property also allows the author to show or hide an element. It is similar to the visibility property. However, if you set display: none, it hides the entire element, while visibility: hidden means that the contents of the element will be invisible, but the element stays in its original position and size.


2:  Action support adds AJAX support to another visual force component and then call the controller method. 
    for example:

<apex:outputpanel id="outptpnl">
             <apex:outputText value="click here"/>
         <apex:actionSupport event="onclick" action="{!controllerMethodName}"  rerender="pgblck" />
Link :

Hope it Helps you. Mark this answer Solved if it resolves your query.​