Skip to content
This repository has been archived by the owner. It is now read-only.

Latest commit

 

History

History
95 lines (79 loc) · 2.27 KB

File metadata and controls

95 lines (79 loc) · 2.27 KB
layout post
title Button-Type
description button type
platform js
control Button
documentation ug
api /api/js/ejbutton

Button Type

Button is used as normal click able button, submitting form data, resetting the form data to its initial value. According to the usage of button, you can render the button in three types. Using the type property, you can easily render the button in following types.

List of Button types

Button Types Description
button The button is a click able button
submit The button is a submit button (submits form-data)
reset The button is a reset button (resets the form-data to its initial values)

The following steps explains you the details about rendering the Button with above mentioned button types.

In the HTML page, add the following button elements to configure Button widget.

{% highlight html %}

<button id="buttonType_button">button</button>
<br />
<br />
<button id="buttonType_submit">submit</button>
<br />
<br />
<button id="buttonType_reset">reset</button>

{% endhighlight %}

{% highlight javascript %}

// Initialize the control in JavaScript
//type property is used to render different type of buttons
$(function () {
    $("#buttonType_button").ejButton({
        size: "mini",
        //this type specifies the normal click able button
        type: "button",
        showRoundedCorner: true
    });
    $("#buttonType_submit").ejButton({
        size: "mini",
        //this button is used to submit form data
        type: "submit",
        showRoundedCorner: true
    });
    $("#buttonType_reset").ejButton({
        size: "mini",
        //this button is used to reset the form data to its initial value
        type: "reset",
        showRoundedCorner: true
    });
});

{% endhighlight %}

Execute the above code to render the following output.