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.
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