Ver Mensaje Individual
  #14 (permalink)  
Antiguo 15/04/2009, 13:55
Avatar de TonyChile
TonyChile
 
Fecha de Ingreso: marzo-2009
Ubicación: Maipú, Santiago
Mensajes: 422
Antigüedad: 15 años, 10 meses
Puntos: 7
Respuesta: LLamado a funcion desde un boton

Boton function buscar().
Les digo como lo estoy intentando:

Esta es la funcion
Código asp:
Ver original
  1. <script language="javascript">
  2. function buscar()
  3. {  
  4.     //sql2_2= " select * from CHIP WHERE MOVIL ='" & Request("MOVIL") & "'"
  5.       <%
  6.       if  Request("CCequipo") = EQUIPO or request("CCmodelo") = MODELO   then
  7.      
  8.        sql2_2= "insert into tabla1 (rs2(0), rs2(1), rs2(2), rs2(3), rs2(4), rs2(5), rs2(6), rs2(7), rs2(8)) values " &  " ('" & NUM_SERIE & "', '" & MAC & "', '" & PIN & "', '" & ACCESORIOS & "', '" & FECHA_ENTREGA_CELULAR & "', '" & FECHA_RETIRO_CELULAR & "', '" & ASIGNADO & "', '" & NO_ASIGNADO & "', '" & NOTAS & "') WHERE EQUIPO = '" & CCequipo & "', MODELO = '" & CCmodelo & "'"
  9.      
  10.       end if
  11.       %>
  12.  
  13. }
  14. </SCRIPT>

las combo y el boton:

Código asp:
Ver original
  1. <table name="tabla" width="352" class="fondo_table3">
  2. <tr><td colspan=6 class="titulo"></td></tr>
  3.     <tr><td colspan="6" height=4></td></tr>
  4.    
  5.   <tr>
  6.             <td width="30%" nowrap class="text_black_bold_12 Estilo3">&nbsp;<strong>Tel&eacute;fono</strong>&nbsp;</td>
  7. <td colspan="3">
  8.             <!--
  9.             <%
  10.             'SQL3 = "SELECT distinct EQUIPO"
  11.             'SQL3 = SQL3 & " FROM CELULAR "
  12.             'Set reg4 = conecta.Execute(SQL3)                  
  13.             %>
  14.              -->      
  15.               <select name="CCequipo" id="CCequipo" class="combo" onMouseover="showtip2(this,event,'Seleccione el Equipo');" onMouseout="hidetip2();" style="cursor:hand">
  16.               <option value="0" selected>Seleccionar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
  17.                     <%
  18.                     While (not reg4.EOF)
  19.                     %>
  20.                     <option value="<%=(reg4.Fields.Item("EQUIPO").Value)%>"><%=(reg4.Fields.Item("EQUIPO").Value)%></option>
  21.                     <%
  22.                     reg4.Movenext
  23.                     wend
  24.                     %>                
  25.               </select>
  26.          </td>           
  27.   </tr>
  28.  
  29.   <tr>
  30.             <td class="text_black_bold_12" width="20%" nowrap>&nbsp;<strong>Modelo</strong>&nbsp;</td>
  31.             <td colspan="3">
  32.               <select name="CCmodelo" id="MODELO" class="combo" onMouseover="showtip2(this,event,'Seleccione el Modelo');" onMouseout="hidetip2();" style="cursor:hand">
  33.               <option value="0" selected>Seleccionar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
  34.               <%
  35.               While (not reg5.EOF)
  36.               %>
  37.               <option value="<%=(reg5.Fields.Item("MODELO").Value)%>"><%=(reg5.Fields.Item("MODELO").Value)%></option>
  38.               <%
  39.               reg5.Movenext
  40.               wend
  41.               %>
  42.               </select>      
  43.           </td>          
  44.   </tr>
  45.  
  46.  
  47.   <tr><td colspan="6" width="100%">&nbsp;</td></tr>
  48.     <tr>
  49.         <td colspan="6" align="center">
  50.         <input type="button" name="CCbuscar" value="Buscar" class="botton80x23" onClick="buscar(CCequipo, CCmodelo)" onMouseover="showtip2(this,event,'Buscar la información Seleccionada');" onMouseout="hidetip2();" style="cursor:help">&nbsp;&nbsp;&nbsp;
  51.         <input type="button" name="CClimpiar" value="Limpiar" class="botton80x23" onClick="limpiar(CCequipo.value = '0' , CCmodelo.value = '0')" onMouseover="showtip2(this,event,'Limpia los datos de Búsqueda');" onMouseout="hidetip2();" style="cursor:hand">      
  52.         </td>
  53.     </tr>
  54.     <tr><td colspan="6">&nbsp;</td></tr>
  55. </table>


No se como hacer q me funcione
Alguna idea
Gracias