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

Alguna idea?

Estas en el tema de Alguna idea? en el foro de ASP Clásico en Foros del Web. Alguien tiene alguna idea de como puedo hacer para que cada día se muestre un texto diferente que este en una base de datos access? ...
  #1 (permalink)  
Antiguo 08/06/2002, 12:52
 
Fecha de Ingreso: febrero-2002
Mensajes: 11
Antigüedad: 22 años, 3 meses
Puntos: 0
Alguna idea?

Alguien tiene alguna idea de como puedo hacer para que cada día se muestre un texto diferente que este en una base de datos access?

Saludos.
  #2 (permalink)  
Antiguo 08/06/2002, 22:27
Avatar de ashketchum  
Fecha de Ingreso: julio-2001
Ubicación: En algun lugar de un gran pais
Mensajes: 418
Antigüedad: 22 años, 11 meses
Puntos: 0
Re: Alguna idea?

Lo que puedes hacer es hacerlo en Java, aqui te dejo un ejemplo, esta tomado del Deposito de JavaScript:

primero pones este código:

<!-- PRIMER PASO: Copiar dentro del tag BODY -->

<script language="JavaScript1.1" src="frases.js">
</script>

y despues aqui pones las frases:


var quotes=new Array()

//cambiar las frases

quotes[0]='There are some people who live in a dream world, and there are some who face reality; and then there are those who turn one into the other. <i>-By Douglas Everett</i>'

quotes[1]='Whether you think you can or whether you think you can\'t, you\'re right! <i>-Henry Ford</i>'

quotes[2]='I know of no more encouraging fact than the unquestionable ability of man to elevate his life by conscious endeavor. <i>-Henry David Thoreau</i>'

quotes[3]='Do not let what you cannot do interfere with what you can do. <i>-John Wooden</i>'

quotes[4]='Accept everything about yourself - I mean everything, You are you and that is the beginning and the end - no apologies, no regrets. <i>-Clark Moustakas</i>'

quotes[5]='We must accept life for what it actually is - a challenge to our quality without which we should never know of what stuff we are made, or grow to our full stature. <i>-Ida R. Wylie</i>'

quotes[6]='High achievement always takes place in the framework of high expectation. <i>-Jack Kinder</i>'

quotes[7]='The measure of a man is the way he bears up under misfortune. <i>-Plutarch</i>'

quotes[8]='Don\'t wait for your ship to come in, swim out to it. <i>-Anon</i>'

...

Puedes poner todos los cuotes que quieras y al final pones esto:

var whichquote=Math.floor(Math.random()*(quotes.length ))
document.write(quotes[whichquote])

espero te sirva

saludos y suerte

<img src="http://www.efrance.fr/masterASPx/firma.jpg" width="465" height="79" border="0" usemap="#URL">
<map name="URL">
<area shape="rect" coords="270,48,347,61" href="http://www.efrance.fr/masteraspx" target="_blank">
</map>
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 21:28.