Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/12/2004, 22:58
Alex Cruz
 
Fecha de Ingreso: julio-2004
Mensajes: 194
Antigüedad: 20 años, 5 meses
Puntos: 0
Y lo combine con estos dos javascript en el mismo html: Un texbox con display. y un cambio de imagen con onMouseOver y onMouseOut.

----------------------------------------


<html>
<head>
<title>PRUEBA DE LOS TRES JAVASCRIPT</title>

<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

<script language=javaScript>
// width of the ticker
var tickerwidth=140

// height of the ticker
var tickerheight=150

// distance from the messagetext to the tickermarrgin (pixels)
var tickerpadding=5

// borderwidth of the ticker (pixels)
var borderwidth=2

// font-family
var fnt="Verdana"

// font-size of the text
var fntsize=8

// font-size of the last letter of the ticker
var fntsizelastletter=8

// font-color of the text
var fntcolor="FF8800"

// font-color of the last letter of the ticker
var fntcolorlastletter="FFFFFF"

// font-weight. Set a value between 1 to 9 to adjust the boldness
var fntweight=3

// backgroundcolor
var backgroundcolor="000000"

// standstill between the messages (microseconds)
var standstill=2000

// speed (a higher value will slow down the ticker)
var speed=40

// horizontal distance from the textlink to the popupbox (pixels)
var xdistance=50

// vertical distance from the textlink to the popupbox (pixels)
var ydistance=20

// Do not edit the variables below
var timer
var topposition=0
var leftposition=0
var x,y
var i_substring=0
var i_presubstring=0
var i_message=0
var message
var messagecontent=""
var messagebackground=""
var messagepresubstring=""
var messageaftersubstring=""
fntweight=fntweight*100

function getmessagebackground() {
messagebackground="<table border="+borderwidth+" width="+tickerwidth+" height="+tickerheight+" cellspacing=0 cellpadding=0><tr><td valign=top bgcolor='"+backgroundcolor+"'>"
messagebackground+=" </td></tr></table>"
}

function getmessagecontent() {
messagecontent="<table border=0 cellspacing=0 cellpadding="+tickerpadding+" width="+tickerwidth+" height="+tickerheight+"><tr><td valign=top>"
messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsize+"pt;font-weight:"+fntweight+"'>"
messagecontent+="<font color='"+fntcolor+"'>"
messagecontent+=messagepresubstring
messagecontent+="</font>"
messagecontent+="</span>"
messagecontent+="<span style='position:relative; font-family:"+fnt+";color:"+fntcolor+";font-size:"+fntsizelastletter+"pt;font-weight:900'>"
messagecontent+="<font color='"+fntcolorlastletter+"'>"
messagecontent+=messageaftersubstring
messagecontent+="</font>"
messagecontent+="</span>"
messagecontent+="</td></tr></table>"
}

function showticker() {
if (i_substring<=message.length-1) {
i_substring++
i_presubstring=i_substring-1
if (i_presubstring<0) {i_presubstring=0}
messagepresubstring=message.substring(0,i_presubst ring)
messageaftersubstring=message.substring(i_presubst ring,i_substring)
getmessagecontent()
if (document.all) {
ticker.innerHTML=messagecontent
timer=setTimeout("showticker()", speed)
}
if (document.layers) {
document.ticker.document.write(messagecontent)
document.ticker.document.close()
timer=setTimeout("showticker()", speed)
}
}
else {
clearTimeout(timer)
}
}

function hideticker() {
clearTimeout(timer)
i_substring=0
i_presubstring=0
if (document.all) {
document.all.ticker.style.visibility="hidden"
document.all.tickerbg.style.visibility="hidden"
}
if (document.layers) {
document.ticker.visibility="hidden"
document.tickerbg.visibility="hidden"
}
}

function showmessage(linkmessage) {
getmessagebackground()
message=linkmessage

i_substring=0
i_presubstring=0
leftposition=x+xdistance
topposition=y+ydistance
if (document.all) {
document.all.ticker.style.posLeft=leftposition
document.all.ticker.style.posTop=topposition
document.all.tickerbg.style.posLeft=leftposition
document.all.tickerbg.style.posTop=topposition
tickerbg.innerHTML=messagebackground
document.all.ticker.style.visibility="visible"
document.all.tickerbg.style.visibility="visible"
showticker()
}
if (document.layers) {
document.ticker.left=leftposition
document.ticker.top=topposition
document.tickerbg.left=leftposition
document.tickerbg.top=topposition
document.tickerbg.document.write(messagebackground )
document.tickerbg.document.close()
document.ticker.visibility="visible"
document.tickerbg.visibility="visible"
showticker()
}
}

function handlerMM(e){
x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}

if (document.layers){
document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

// - End of JavaScript - -->
</script>


<script language="JavaScript">
/*******************************
Otra forma de abrir ventanas 2. Por Carlitos. [email protected]
Si usas este script, deja intactas estas líneas (créditos). Vale?
También te agradecería un e-mail con tus comentarios.
*******************************/
function abrir()
{
ancho = 500
alto = 240
pagina = "pagina.htm"
t = -alto
l = (screen.width-ancho)/2
tf = (screen.height-alto)/2
ventana=window.open("http://mx.geocities.com/ocielsanchez/AC_AMAZING_COMIC_2.HTML","HomeMM","width=500,heigh t=240")
for (t;t<=tf;t+=1) ventana.moveTo(l,t)
}
</script>

</head>


<body bgcolor="BLACK" text="WHITE">

<CENTER>
<a href="javascript:abrir()" onMouseOver="showmessage('Hola amigo Internauta, en este link encontraras informacion sobre el tema del que se habla y se desarrolla en esta seccion de la pagina, disfruta la infomacion.')" onMouseOut="hideticker()">
<div style="color:red; font-size:x-large; font-family:Arial Black">
<font color="red">AC AMAZING COMIC</font></div>
</a>
</CENTER>

<br>
<br>
<br>
<br>

<center>
<a href="http://www.playstation.com" target="_blank"
onMouseOver="document.the_image1.src='http://www.tonamelt.com/Publicidad/playstation-go.GIF';"
onMouseOut="document.the_image1.src='http://www.tonamelt.com/Publicidad/playstation.gif';">
<img src="http://www.tonamelt.com/Publicidad/playstation.gif" name="the_image1" border="0" hspace="4" vspace="4">
</a></center>

<br>
<br>
<br>
<br>

<center>
<a href="http://www.cinepolis.com.mx" target="_blank"
onMouseOver="document.the_image2.src='http://www.tonamelt.com/Publicidad/cineapolis-go.GIF';"
onMouseOut="document.the_image2.src='http://www.tonamelt.com/Publicidad/cinepolis.gif';">
<img src="http://www.tonamelt.com/Publicidad/cinepolis.gif" name="the_image2" border="0" hspace="4" vspace="4">
</a></center>

<br>
<br>
<br>
<br>

<center>
<a href="http://www.latin.aiwa.com/mx/" target="_blank"
onMouseOver="document.the_image3.src='http://www.tonamelt.com/Publicidad/aiwa-go.GIF';"
onMouseOut="document.the_image3.src='http://www.tonamelt.com/Publicidad/aiwa.gif';">
<img src="http://www.tonamelt.com/Publicidad/aiwa.gif" name="the_image3" border="0" hspace="4" vspace="4">
</a></center>

<br>
<br>
<br>
<br>

<center>
<a href="http://www.motorola.com/mx" target="_blank"
onMouseOver="document.the_image4.src='http://www.tonamelt.com/Publicidad/motorola-go.GIF';"
onMouseOut="document.the_image4.src='http://www.tonamelt.com/Publicidad/motorola.gif';">
<img src="http://www.tonamelt.com/Publicidad/motorola.gif" name="the_image4" border="0" hspace="4" vspace="4">
</a></center>

<br>
<br>
<br>
<br>

<center>
<a href="http://www.mixup.com.mx/mixup/" target="_blank"
onMouseOver="document.the_image5.src='http://www.tonamelt.com/Publicidad/mixup-go.GIF';"
onMouseOut="document.the_image5.src='http://www.tonamelt.com/Publicidad/mixup.JPG';">
<img src="http://www.tonamelt.com/Publicidad/mixup.JPG" name="the_image5" border="0" hspace="4" vspace="4">
</a></center>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

<TABLE>
<TR>
<TD ALIGN="center" width="100%">
<DIV ID="tickerbg" style="position:absolute;"></DIV>
<DIV ID="ticker" style="position:absolute;"></DIV>
<ul>
</ul>
</TD>
</TR>
</TABLE>

</body>
</html>

Última edición por Alex Cruz; 28/12/2004 a las 23:00