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
mac adminmac admin 

Clear the page message in custom vfpage

Hi all,

I showing the success message after uploading the file as an attachment form custom vfpage. Now I want to clear the page message when I click the Browse button in custom vfpage. Can we achive this.

Can anyone help me over here.

Thanks in advance.

Regards,
mac.
Vivian Charlie 1208Vivian Charlie 1208

Hi Mac,

 

On the Browse button can you set the rerender attribute and specify the pagemessage id for refresh

Example

<apex:page>

<apex:form>

<apex:pagemessages id= "pgMsg"/>

<apex:commandbutton action="{!yourMethod}" value="Browse" rerender="pgMsg"/>

</apex:form>

</apex:page>

 

Thanks

Vivian