This documentation is for the old version. Go to the latest Upload Suite docs

Uploader.ViewChange Event

Supported browsers: Internet ExplorerFirefoxGoogle ChromeSafari

This event fires when the view mode is changed.

Syntax

ASP.NET
<script type="text/javascript">
function Uploader1_ViewChange(pane){
    //...your code...
}
</script>
<aur:Uploader ID="Uploader1" runat="server">
    <ClientEvents>
        <aur:ClientEvent EventName="ViewChange" HandlerName="Uploader1_ViewChange" />
    </ClientEvents>
</aur:Uploader>
PHP
<script type="text/javascript">
function Uploader1_ViewChange(pane){
    //...your code...
}
</script>
<?php
    $Uploader = new Uploader("Uploader1");
    //...other params...
    $Uploader->getClientEvents()->setViewChange("Uploader1_ViewChange");
    //...other params...
    $Uploader->render();
?>
JavaScript
function Uploader1_ViewChange(pane){
    //...your code...
}
$au.uploader({
    events: {
        //...other params...
        viewChange: [Uploader1_ViewChange],
        //...other params...
    }
})

Parameters

pane

Type: String

A member of this enumeration which specifies a pane where the view mode is changed:

ValueDescription
FolderPaneThe folder pane.
UploadPaneThe upload pane.

Remarks

Typically, you should use this event when it is necessary synchronize HTML user interface with view mode of Image Uploader. For example, if you add drop-down list which toggles view modes, this event enables you to update drop-down state if the view mode is changed through the context menu of the Image Uploader.

See Also

Reference

Manual