TinyNextSelect 0.2

Simple and tiny plugin for load data for a next select. (Mootools)



Details

Author
Danillo César
Current version
0.2
GitHub
danillos/tiny-next-select
Downloads
6121
Category
Forms
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_: core/1.2.4+

How to use

Include on page:

<script src="mootools-core.js" type="text/javascript"></script>
<script src="tiny_next_select.js" type="text/javascript"></script>

Simple example:

// Javascript
window.addEvent('domready',function() {

    $('simple_contries').tinyNextSelect({
        next: $('simple_states'),
        url: 'data_states.php'
    })

});

Html:

<!-- HTML -->
<label for="">Country:</label>
<select id="simple_contries">
    <option value=''>Select your country</option>
    <option value='1'>Country 1</option>
    <option value='2'>Country 2</option>
</select>

<br>

<label for="">State:</label>
<select id="simple_states">
        <option>Select country first</option>
</select>

Server Side PHP:

<?php
    // value from selected option
    $value = $_GET['value'];
    // echo <option>...</option>
    //..
?>

See Demo and Documentation for more detail.

DEMO | DOCUMENTATION | DOWNLOAD


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus