Foros del Web » Programando para Internet » Javascript »

scroll en textarea y foco....

Estas en el tema de scroll en textarea y foco.... en el foro de Javascript en Foros del Web. Hola!, Tengo Un Textarea, Esta Con Readonly Y Ocupa COLS=30 y ROWS=20 Esta con El Scroll Horizontal Escondido (overflow:hidden), Y el Vertical En Auto. Este ...
  #1 (permalink)  
Antiguo 25/03/2002, 15:36
 
Fecha de Ingreso: julio-2001
Ubicación: Internet
Mensajes: 1.690
Antigüedad: 22 años, 9 meses
Puntos: 1
scroll en textarea y foco....

Hola!,

Tengo Un Textarea, Esta Con Readonly Y Ocupa COLS=30 y ROWS=20

Esta con El Scroll Horizontal Escondido (overflow:hidden), Y el Vertical En Auto.

Este Va Recibiendo Datos Cada Ciertos Segundos Desde Otro Frame Que Se Actualiza Cada Ciertos Segundos.

El Caso Es Que Con Cada Dato Escribe una Linea Nueva:

dato1
dato2
dato2
...

Cuando Se Supera El Tamaño Aparece El Scroll Vertical, Pero No Baja!, Se Queda Arriba.

Necesito Que El Usuario Pueda Ver El Ultimo dato Introducido, Osea, Que El Scroll Baje.

He Probado dandole Foco Pero De Nada Sirve.

No Se Si Me Explique Bien, Si No Es Asi Favor Decirme Para Intentar Explicarme Mejor.
  #2 (permalink)  
Antiguo 26/03/2002, 02:52
 
Fecha de Ingreso: marzo-2002
Mensajes: 46
Antigüedad: 22 años, 1 mes
Puntos: 0
Re: scroll en textarea y foco....

<HTML><HEAD><TITLE>Untitled&l t;/TITLE>
<SCRIPT>
function fnCheckScroll(){
AreaScroll.scrollTop = AreaScroll.scrollHeight
}
</SCRIPT>
</HEAD>
<BODY><TEXTAREA id=AreaScroll style="HEIGHT: 80px; OVERFLOW: scroll; TEXT-ALIGN: left; WIDTH: 120px"> Principio
actuall
200, th
of the t
dimen
Final
</TEXTAREA>

<INPUT onclick=fnCheckScroll() type=button value="Hacer Scroll">

"No Hay Cosas Imposibles,.........................." ;)
</BODY>
</HTML>
  #3 (permalink)  
Antiguo 26/03/2002, 02:55
 
Fecha de Ingreso: marzo-2002
Mensajes: 46
Antigüedad: 22 años, 1 mes
Puntos: 0
Re: scroll en textarea y foco....

<HTML><HEAD><TITLE>Untitled&l t;/TITLE>
<body>
<p><STRONG>Documentacion que puede te
venga bien. Toda la info, la he extraido del MSDN Junuary 2001. 3Cd's aunque
esta info. también está disponible en la web msdn de
Microsoft<BR><BR>scrollHeight </STRONG>
Retrieves the scrolling height of the la <LABEL>bel.</LABEL><LABEL><BR><BR><STRO NG>scrollLeft </STRONG>
Sets or retrieves the distance between the left edge of the label <LABEL> and the
leftmost portion of the content currently visible in the window.
<BR><BR><STRONG>scrollTop </STRONG>
Sets or retrieves the distance between the top of the label <LABEL> and the topmost portion of the
content currently visible in the window.<BR><BR><STRONG>scrollWid th
</STRONG>
Retrieves the scrolling width of the label <LABEL>.<BR>

<BR><U><STRONG>Detalle de scrollTop
Property <BR></STRONG></U>Sets or retrieves the distance between the top
of the object and the topmost portion of the content currently visible in the
window. Syntax HTML N/A Scripting object.scrollTop [ = iDistance ] Possible
Values iDistance Integer that specifies the distance, in pixels. The property is
read/write with a default value of 0. Expressions can be used in place of the
preceding value(s), as of Microsoft® Internet Explorer 5. For more information,
see Dynamic Properties. Remarks The property's value is equal to the vertical
distance scrolled by the content of the object. Although the value can be set to
any positive or negative value, if the assigned value is less than 0, the
property is set to o. If the assigned value is greater than the maximum
possible, the property is set to the maximum possible. You can set this property
inline, but the results might be inconsistent while the page is loading. This
property is always 0 for objects that do not have scroll bars. For these
objects, setting the property has no effect. When a MARQUEE object scrolls
horizontally, its scrollTop property is set to 0, overriding any script setting.
For more information about how to access the dimension and location of elements
on the page through the document object model, see Measuring Element Dimension
and Location.</LABEL></LABEL></LABEL></LABEL></p></body>
</HTML> :cantar:
  #4 (permalink)  
Antiguo 26/03/2002, 08:04
 
Fecha de Ingreso: julio-2001
Ubicación: Internet
Mensajes: 1.690
Antigüedad: 22 años, 9 meses
Puntos: 1
Re: scroll en textarea y foco....

Hola!,

Muchas Gracias.

<CENTER><FONT COLOR=Black SIZE=2><I>"No Hay Cosas Imposibles, Solo Hombres Incapaces"</I></FONT></CENTER>
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 04:34.