Ciao a tutti,

ho 2 problemi:

Ho un form con 2 campi (CODICE + CODICE A BARRE)per la ricerca di articoli.
1) Devo dare il focus al campo CODICE e automaticamente disabilitare il campo CODICE A BARRE e viceversa.

2) Ho creato un piccolo tastierino numerico che scrive però soltanto sul campo CODICE e non so come poterlo settare in modo da scrivere dove c'è il focus.

Codice PHP:
<html>

<
head>
<
meta http-equiv="Content-Language" content="it">
<
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<
title>Info Prezzi</title>
</
head>

<
body>


<
div align="center">
<
table border="1" width="360" id="table2" height="300" style="border-collapse: collapse">
<
tr>
<
form name="InfoPrezzi" method="POST" action="CercaPrezzi.asp">
<
td valign="top">
<
table border="0" width="100%" id="table3">
<
tr>
<
td width="35%"><font face="Arial" size="2">[b]
CODICE INTERNO[/b]</font></td>
<
td width="63%">
<
input type="text" name="CODICE" size="6" style="font-size: 14pt; font-family: Arial"></td>
</
tr>
<
tr>
<
td width="35%"><font face="Arial" size="2">[b]CODICE A BARRE[/b]</font></td>
<
td width="63%">
<
input type="text" name="CODICEABARRE" size="20" style="font-size: 14pt; font-family: Arial"></td>
</
tr>
<
tr>
<
td colspan="2" align="center">
<
table border="1" width="230" id="table4">
<
tr>
<
td width="51">
<
input type="button" name="7" value="7" onClick="form.CODICE.value += '7'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="51">
<
input type="button" name="8" value="8" onClick="form.CODICE.value += '8'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="50">
<
input type="button" name="9" value="9" onClick="form.CODICE.value += '9'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td rowspan="2" width="50">
<
button name="Canc" onClick="form.CODICE.value = ''" style="width: 50px; height: 110px" value="C">
<
font size="5">[b]C[/b]</font></button>
</
td>
</
tr>
<
tr>
<
td width="51">
<
input type="button" name="4" value="4" onClick="form.CODICE.value += '4'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="51">
<
input type="button" name="5" value="5" onClick="form.CODICE.value += '5'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="50">
<
input type="button" name="6" value="6" onClick="form.CODICE.value += '6'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
</
tr>
<
tr>
<
td width="51">
<
input type="button" name="1" value="1" onClick="form.CODICE.value += '1'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="51">
<
input type="button" name="2" value="2" onClick="form.CODICE.value += '2'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="50">
<
input type="button" name="3" value="3" onClick="form.CODICE.value += '3'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td rowspan="2" width="50">
<
button name="Space" onClick="form.CODICE.value += ' '" style="width: 50px; height: 110px" value="SP">
[
b]<font size="5">SP</font>[/b]</button>
</
td>
</
tr>
<
tr>
<
td width="51">
<
input type="button" name="0" value="0" onClick="form.COD.value += '0'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="51">
<
input type="button" name="00" value="00" onClick="form.COD.value += '00'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
<
td width="50">
<
input type="button" name="." value="." onClick="form.COD.value += '.'" style="color: #000000; background-color: #C0C0C0; height: 50 px; width: 50 px; font-size: 18 pt; font-weight: bold"></td>
</
tr>
<
tr>
<
td colspan="4">
<
input type="submit" value="CERCA" style="color: #000000; background-color: #C0C0C0; height: 50; width: 221; font-size: 18 pt; font-weight: bold"></td>
</
tr>
</
table>
</
td>
</
tr>
<
tr>
<
p align="center"></td>
</
tr>
</
table>
</
td>
<
input type="hidden" name="Azione" value="SI">
</
form>
</
tr>
</
table>
</
div>


</
body>

</
html