{source}
<!-- You can place html anywhere within the source tags -->
<div>لمعرفة الرد على مطلبكم الرجاء ادخال رقم بطاقة تعريفكم المتكون وجوبا من 8 ارقام</div>
<div>
ر.ب.ت :<input type="text" id="CIN">
<br/>
<input type="submit" class="btn btn-primary" name="rechercher" id="rechercher" value="بحث" />
<a href="/index.php"> <input type="submit" class="btn btn-primary" value="رجوع"/></a>
</div>
<br/>
<br/>
<div id="result">
</div>
<script src="https://unpkg.com/imask"></script>
<script language="javascript" type="text/javascript">
//var element = document.getElementById('CIN');
//var maskOptions = { mask: /^[1-9]\d{0,7}$/ };
//var mask = IMask(element, maskOptions);
jQuery(document).ready(function($) {
$('#rechercher').click(function(){
var ajaxurl = 'https://www.commune-ajim.gov.tn/custom/GRBAR_WS.php',
data = {'action':'getRefPersonne','cin':$('#CIN').val()};
jQuery.post(ajaxurl, data, function (response) {
// Response div goes here.
//alert(response);
$('#result').html(response);
});
});
});
</script>
{/source}