Foros del Web » Programando para Internet » ASP Clásico »

ayuden a un Novato Porfa

Estas en el tema de ayuden a un Novato Porfa en el foro de ASP Clásico en Foros del Web. hola atodos ... TENGO ESTE CODIGO..... NECESITO PONERLE NAME ACADA BOTON QUE CREA... LOS BOTONES SON CREADOS POR CADA FIELD DEL RS QUE SE ENCUENTRE ...
  #1 (permalink)  
Antiguo 17/08/2005, 19:09
 
Fecha de Ingreso: mayo-2005
Mensajes: 117
Antigüedad: 19 años
Puntos: 0
Sonrisa ayuden a un Novato Porfa

hola atodos ...

TENGO ESTE CODIGO..... NECESITO PONERLE NAME ACADA BOTON QUE CREA... LOS BOTONES SON CREADOS POR CADA FIELD DEL RS QUE SE ENCUENTRE DEPENDIENDO LA CONSULTA Y EN EL "value" SE PONE LO QUE CONTIENE CADA FIELD.... NECESITO PONERLES NAME A CADA BOTON CREADO P. EJ. boton0, boton1, boton2, boton2..... ETC..PARA PODER MANIPULARLOS...PARA HACER ESTO TRATE DE CONCATENEAR LA "i" (CONTADOR DEL FOR) AL FINAL DE "boton" (NAME DE ACADA BOTON).. PERO NO TENGO NI LA IDEA DE COMO SE HACE......
MEGUSTARIA QUE ME AYUDARAN PORFAVOR...




<% do while not rstemp.eof %>

<tr>
<% for i = 0 to howmanyfields

thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue="&nbsp;"
end if%>
<td valign=top><input type ="submit" name="boton" value="<%=thisvalue%>"</td>
<% next %>

</tr>
<%rstemp.movenext
loop%>



AHORA COMO PUEDO MANIPULAR EL EVENTO DE CADA BOTON (CLICK) PARA P. EJ. MOSTRAR UN MSBOX O MANDAR A LLAMAN A UN sub QUE ESTA EN EL MISMO CODIGO, ALMOMENTO DE DAR CLCIK?????


MEGUSTARIA QUE ME AYUDARAN .. AGRADESCO SU TIEMPO

ATTE ......rahd RR
  #2 (permalink)  
Antiguo 17/08/2005, 19:21
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
Código:
 
<% for i = 0 to howmanyfields

thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue="&nbsp;"
end if%>
<td valign=top><input type ="submit" name="<%="boton"&i%>" value="<%=thisvalue%>"</td>
<% next %>
Que es lo que quieres manipular mediante su name exactamente?

Salu2,
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #3 (permalink)  
Antiguo 18/08/2005, 13:35
 
Fecha de Ingreso: mayo-2005
Mensajes: 117
Antigüedad: 19 años
Puntos: 0
....

los botones que son creados...se supone que el name es para identificarlos y manipularlos.... en tonces al dar click quiero lamar a un procesidoento o subrutina....



esperoq ue sea claro lo qeu nesecito espero me ayuden...

..... saben donde hay un canal en irc para ASP??????

gracias
  #4 (permalink)  
Antiguo 18/08/2005, 13:43
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
Código:
<td valign=top><input type ="submit" name="<%="boton"&i%>" value="<%=thisvalue%>" onclick="javascript:algunafunction(this);"></td>
Salu2,
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #5 (permalink)  
Antiguo 18/08/2005, 15:10
 
Fecha de Ingreso: mayo-2005
Mensajes: 117
Antigüedad: 19 años
Puntos: 0
agradesco la ayuda y su tiempo...pero....


como hacer que sea una funcion diferente por boton....tomando encuneta que los botones se crean dentro del for....y la funcion tiene que recibir parametro en este caso el value (caption) de este boton.......



espero me entiendadn ..... y me ubique y me ayuden ..gracias...
  #6 (permalink)  
Antiguo 18/08/2005, 15:54
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
Y dale

Para que quieres una funcion por boton??

Código:
<script language="javascript">
  function algunafunction(objBoton)
  {
     alert(objBoton.name);
  }
</script>

<td valign=top><input type ="submit" name="<%="boton"&i%>" value="<%=thisvalue%>" onclick="javascript:algunafunction(this);"></td>
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #7 (permalink)  
Antiguo 18/08/2005, 16:11
 
Fecha de Ingreso: mayo-2005
Mensajes: 117
Antigüedad: 19 años
Puntos: 0
esto esta asi....

valido al usuario ...este usuario tiene varios grupos (de alumno , son profesores) entonces pongo boton por grupo en tonce a la hora que da click despliega la lista de todos los alumno inscritos con el .... ahora como pongo el numero de grupo en el value del boton pues necesitop llamar una funcion con el grupo por parametro ..osea
al dar click llama lafuncion funcion(grupo) donde el grupo esta en el value de cada bototn...

espero ahora si me expli que :s
gracias


alguien sabe de un canal en IRC de ASP????
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 00:31.