OAT Basic Operations

This short document describes what you need to do to include OAT's features into your web pages.

Example

The following example shows how to use OAT to display a date picker.


<html>
<head>
    <script type="text/javascript">
        var featureList=["calendar"];
        function init() {
            var returnedDate = function(date) { alert("You selected "+date); }
            var calendar = new OAT.Calendar();

            var showCallback = function(event) {
                calendar.show(event.clientX, event.clientY, returnedDate);
            }

            OAT.Event.attach("button","click",showCallback);
        }
    </script>
    <script type="text/javascript" src="oat/loader.js"></script>
    <style type="text/css">
        .calendar {
            border: 1px solid #000;
        }

        .calendar_year, .calendar_month {
            text-align: center;
            border-bottom: 1px solid #aaa;
            padding: 2px 0px;
        }

        .calendar table {
            margin-top: 2px;
        }

        .calendar thead {
            font-weight: bold;
        }

        .calendar thead td {
            padding: 0px 2px;
        }

        .calendar td {
            font-size: 60%;
            text-align: center;
        }

        td.calendar_selected {
            background-color: #faa;
        }

        .calendar_special {
            color: #c55;
        }
    </style>
    <title>OAT Demo</title>
</head>
<body>
    <input type="button" id="button" value="Pick" />
</body>
</html>

CategoryOAT CategoryOpenSource CategoryDocumentation