Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Latest commit

 

History

History
59 lines (39 loc) · 1.29 KB

README.md

File metadata and controls

59 lines (39 loc) · 1.29 KB

TinyNextSelect

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

Screenshot

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