Hi,
First of all, I would like to wish a happy new year 2016 to all.
I try to integrate barcode reading on javascript in a multiple rows form app calling a blank app for mysql update, this my code :
in onScriptInit
[v_strecho]="BarCode/Ref.: <input type=‘text’ id=‘barCode’ autofocus ><button>Add</button>
<table border=‘1’ id=‘list’ width=‘100%’>
<tr>
<th>Bar Code</th>
<th>Qty</th>
</tr>
</table>
<script type=‘text/javascript’>
$(function(){
$(‘button’).click(function(){
if($(’#barCode’).val()){
var barCode = $(’#barCode’).val();
//alert(barCode);
window.open('../blank_tmpposjou/blank_tmpposjou.php?v_libart='+barCode,'_self');
if($('#list td:eq(0):contains('+barCode+')').length){
$('#list td:eq(0):contains('+barCode+')').next().text(function(index, text){
return parseInt(text) + 1;
});
} else {
$('#list').append('<tr><td>'+barCode+'</td><td>1</td></tr>');
}
$('#barCode').val('');
}
});
});
</script>";
in footer col1
value => [v_strecho]
My problem is that “blank_tmpposjou” is not executed because of ‘_self’ option ?? If I change only ‘_self’ with ‘_blank’ it execute blank_tmpposjou but it opens a new tab on browser and I don’t want it.
Any help will be appreciated
Thanks
Nac