# OnLoad

The **OnLoad** client-side event occurs after the **RadChat** has been fully initialized on the client-side.

The event handler receives one parameter:

1. The RadChat instance firing the event.

This event is helpful if you need to get the client-side instance of the RadChat when it is embedded in other controls, if you need to configure a chat agent or if you need to post some initial messages.

```ASPNET
<script type="text/javascript">
    function onLoad(sender) {
        var chat = sender;
        chat.postMessage("Hello!");
    }
</script>
<telerik:RadChat runat="server" ID="RadChat1">
    <ClientEvents OnLoad="onLoad" />
</telerik:RadChat>
```

## See Also

* [Kendo UI Chat Events](https://docs.telerik.com/kendo-ui/api/javascript/ui/chat#events)

* [RadChat Client-Side events Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/chat/client-side-programming/events)

* [Connecting to Chat Bot Services](https://www.telerik.com/products/aspnet-ajax/documentation/controls/chat/how-to/configure-chat-agent)

* [RadChat Client-Side API Overview](https://www.telerik.com/products/aspnet-ajax/documentation/controls/chat/client-side-programming/overview)
