Bueno.. quiero hacerles una consulta, sobre un formulario de registros en asp...
Tengo el siguiente form:
Código HTML:
<form id="form1" name="form1" method="post" action=""><table width="507" border="0" cellpadding="1" cellspacing="2"><tr><td colspan="4"><table width="100%" border="0" cellspacing="2" cellpadding="0"><tr><td width="95%"><div align="right"><strong>Código Cliente</strong></div></td><td width="5%"><div align="left"><strong><input readonly type="text" onkeyup="this.value=this.value.toUpperCase()" name="rif_cte2" size="8" maxlength="15" id="rif_cte2" /></strong></div></td></tr></table></td></tr><tr><td width="83"><p align="left"><strong>*NOMBRE </strong></p></td><td colspan="3"><div align="left"><input name="nom_cte" type="text" id="nom_cte" size="50" /></div></td></tr><tr><td><strong>TIPO PERSONA</strong></td><td colspan="3"><table width="100%" border="0" cellspacing="2" cellpadding="0"><tr><td width="14%"><div align="left">NATURAL</div></td><td width="10%"><label><div align="left"><input type="radio" name="tip_cte" id="tip_cte" value="NATURAL" /></label></div></td><td width="13%"><div align="left">JURIDICA</div></td><td width="63%"><div align="left"><input type="radio" name="tip_cte" id="tip_cte" value="JURIDICA" /></div></td></tr></table></td></tr><tr><td><div align="left"><strong>*RIF/D.I.</strong></div></td><td width="188"><div align="left"><input type="text" name="rif_cte" size="15" maxlength="15" id="rif_cte" /></div></td><td width="17"><div align="left"><strong>C.I.</strong></div></td><td width="201"><div align="left"><input type="text" name="ci_cte" size="15" maxlength="15" id="ci_cte" /></div></td></tr><tr><td valign="top"><div align="left"><strong>UBICACIÓN</strong></div></td><td colspan="3" valign="top"><div align="left"><label><select name="ub_cte" id="ub_cte"> <option>--Seleccione un estado--</option> <option value="E01">AMAZONA</option> <option value="E02">ANZOATEGUI</option> <option value="E03">APURE</option> <option value="E04">ARAGUA</option> <option value="E05">BARINAS</option> <option value="E06">BOLIVAR</option> <option value="E07">CARABOBO</option> <option value="E08">COJEDES</option> <option value="E09">DELTA AMACURO</option> <option value="E10">DISTRITO CAPITAL</option> <option value="E11">FALCON</option> <option value="E12">GUARICO</option> <option value="E13">LARA</option> <option value="E14">MERIDA</option> <option value="E15">MIRANDA</option> <option value="E16">MONAGAS</option> <option value="E17">NUEVA ESPARTA</option> <option value="E18">PORTUGUESA</option> <option value="E19">SUCRE</option> <option value="E20">TACHIRA</option> <option value="E21">TRUJILLO</option> <option value="E22">VARGAS</option> <option value="E23">YARACUY</option> <option value="E24">ZULIA</option> <option value="I00">OTRO/INTERNACIONAL</option></select> </label></div></td></tr><tr><td valign="top"><div align="left"><strong>DIRECCIÓN</strong></div></td><td colspan="3" valign="top"><label><div align="left"><textarea name="dir_cte" onkeyup="this.value=this.value.toUpperCase()" id="dir_cte" cols="45" rows="5"></textarea></div> </label></td> </tr> <tr> <td valign="top"><div align="left"><strong>TELEFONOS</strong></div></td> <td colspan="3"><label> <div align="left"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="7%"><div align="left"> <input name="codarea1" onKeypress="noletras()" type="text" id="codarea1" size="4" maxlength="4" /> </div></td> <td width="5%"><div align="left"> <input name="tel1" onKeypress="noletras()" type="text" id="tel1" size="3" maxlength="3" /> </div></td> <td width="88%"><div align="left"> <input name="tel12" onKeypress="noletras()" type="text" id="tel12" size="4" maxlength="4" /> </div></td> </tr> <tr> <td><div align="left"> <input name="codarea2" onKeypress="noletras()" type="text" id="codarea2" size="4" maxlength="4" /> </div></td> <td><div align="left"> <input name="tel2" onKeypress="noletras()" type="text" id="tel2" size="3" maxlength="3" /> </div></td> <td><div align="left"> <input name="tel22" onKeypress="noletras()" type="text" id="tel22" size="4" maxlength="4" /> </div></td> </tr> </table> </div> </label></td> </tr> <tr> <td><div align="left"><strong>FAX</strong></div></td> <td colspan="3"><div align="left"> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="7%"><div align="left"> <input name="codarea3" type="text" id="codarea3" size="4" maxlength="4" /> </div></td> <td width="5%"><div align="left"> <input name="tel3" type="text" id="tel3" size="3" maxlength="3" /> </div></td> <td width="88%"> <div align="left"> <input name="tel32" type="text" id="tel4" size="4" maxlength="4" /> </div></td> </tr> </table> </div></td> </tr> <tr> <td> <div align="left"><strong>CONTACTO</strong></div> <td colspan="3"> <div align="left"> <input name="contac_cte" onkeyup="this.value=this.value.toUpperCase()" type="text" id="contac_cte" size="20" /> </div> <tr> <td><div align="left"><strong>EMAIL </strong></div> <td colspan="3"><div align="left"> <input name="email_cte" onkeyup="this.value=this.value.toUpperCase()" type="text" id="email_cte" size="30" /> </div> <tr> <td height="30" colspan="4"> <div align="center"> <label> </label> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="46%" height="43" valign="bottom"> <div align="right"> <input type="reset" name="enviar2" id="enviar2" value="Limpiar Datos" /> </div></td> <td width="4%" valign="bottom"> </td> <td width="50%" valign="bottom"> <div align="left"> <input type="submit" name="enviar" id="enviar" value="Ingresar Cliente" /> </div></td> </tr> </table> <label></label> </div> </table> </form>
Por ejemplo...
Si estoy llenando el formulario y elijo que es una persona juridica y ubicada en el estado Amazonas, se genere automaticamente este codigo dentro del campo de texto: 0001JE01.
Siendo el 0001 el numero correlativo generado automaticamente, J por que seleccione el tipo de persona Juridica y E01 por que seleccione AMAZONAS en la lista.
Me podrán ayudar en esto?