Hello, I have a piece of code that is taking an enormous quantity of time to run slowing down a personal app. Could you help me checking my code and/or letting me know what could be causing the problem? I'm not an experienced programmer as you may see. But trying to get to it!
This code function is to fill a text field with my client's name when I write down the client's ID in a previous field.
I truly appreciate your help! This is driving me crazy!Code:function mostrarCliente(idCod, idNom){ var Nombre; <? $LeerClientes=mysql_query("SELECT * FROM data.clients WHERE Status='0' ORDER BY ID ASC"); ?> switch(document.getElementById(idCod).value) { <? $LC=$LeerClientes; while($Clientes=mysql_fetch_array($LC)) { ?> case '<? echo $Clientes["ID_empresa"]; ?>': Nombre = "<? echo $Clientes["Nombre"]; ?>"; break; <? } ?> default: Nombre = ''; } document.getElementById(idNom).value = Nombre; }
Thanks!



Reply With Quote
