pokk,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
window.addEventListener('DOMContentLoaded', function() {
var Test = document.querySelectorAll('.PS_Name');
[].forEach.call(Test, function(el,i) {
var PS_name_old="";
el.addEventListener('input', function() {
var result=el.value.match( /^[\x2A-9a-zA-Z\x20\x27]{0,8}$/g );
if(result==null){
el.value=PS_name_old;
}
PS_name_old=el.value;
var el_next=Test[i+1];
if(el.value.length>7 && el_next){
el_next.focus();
el_next.selectionStart=0;
}
});
});
});
</script>
</head>
<body>
<div align="center">
<input id="id_PS_Name_1" name="N_PS_Name_1" type="text" maxlength="8" class="PS_Name">
<input id="id_PS_Name_2" name="N_PS_Name_2" type="text" maxlength="8" class="PS_Name">
<input id="id_PS_Name_3" name="N_PS_Name_3" type="text" maxlength="8" class="PS_Name">
<input id="id_PS_Name_4" name="N_PS_Name_4" type="text" maxlength="8" class="PS_Name">
</div>
</body>
</html>