HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/CMS/CMSAdminControls/ColorPicker/ColorPicker.ascx
<%@ Control Language="C#" AutoEventWireup="true" Inherits="CMSAdminControls_ColorPicker_ColorPicker_Control" CodeFile="ColorPicker.ascx.cs" %>
<asp:TextBox ID="txtColor" runat="server" ReadOnly="true" CssClass="Color form-control input-width-20" />

<script type="text/javascript">
    //<![CDATA[
    function CloseWindow() {
        CloseDialog();
    }

    function SetColor(sourceid, destinationid, previewid, postback) {

        var txtColorElem = document.getElementById(sourceid);
        var destinationElem = wopener.document.getElementById(destinationid);
        var previewElem = wopener.document.getElementById(previewid);

        if (txtColorElem != null) {
            color = txtColorElem.value;
        }
        if (destinationElem != null) {
            destinationElem.value = color;
            if (destinationElem.onchange != null) {
                destinationElem.onchange();
            }
        }
        if (previewElem != null) {
            previewElem.style.backgroundColor = color;
        }
        if (postback) {
            if (destinationElem.fireEvent) {
                destinationElem.fireEvent('onchange');
            }
            else {
                var e = document.createEvent('HTMLEvents');
                e.initEvent('change', false, false);
                destinationElem.dispatchEvent(e);
            }
        }

        CloseWindow();

    }

    //]]>
</script>

<asp:Literal ID="ltlScript" runat="server" EnableViewState="false" />