Foros del Web » Programando para Internet » Javascript »

tengo una duda!

Estas en el tema de tengo una duda! en el foro de Javascript en Foros del Web. hola , necesito la ayuda de alguien , como puedo hacer para ejecutar un script (que luego pondre abajo ) despues de que se de ...
  #1 (permalink)  
Antiguo 03/02/2003, 20:39
Avatar de aprendiz_82  
Fecha de Ingreso: diciembre-2002
Ubicación: algun lugar....
Mensajes: 536
Antigüedad: 21 años, 4 meses
Puntos: 1
tengo una duda!

hola , necesito la ayuda de alguien , como puedo hacer para ejecutar un script (que luego pondre abajo ) despues de que se de clic sobre una imagen? , espero que alguien me ayude , de antemano gracias.

<HTML>
<HEAD>
<TITLE>INGRESA AQUÍ EL TÍTULO DE LA PÁGINA DEL MENSAJE</TITLE>
<SCRIPT LANGUAGE = "JavaScript">
function makeArray() {
this.length = makeArray.arguments.length;
for (var i = 0; i < this.length; i++)
this[i + 1] = makeArray.arguments[i];
}

function makeSlideShow (obj, wait, pre, url) {
this.curText = '';
this.posit = 1;
this.word = obj;
this.length = obj.length;
this.pre = pre;
this.wait = wait;
this.url = url;
this.display = displaySlideShow;
}

function displaySlideShow() {
if (this.posit <= this.length) {
this.curText = this.word[this.posit]
outStringWord = blankFrameTop + this.pre + this.curText + blankFrameBottom;
parent.draw.location = 'javascript:parent.outStringWord';
this.posit++;
}
else {
doneLoop = true;
top.location = this.url;
}
}

function displayLoop() {
if (!doneLoop) reDraw = setTimeout('displayLoop()', wordIntro.wait);
wordIntro.display();
}

var words = new makeArray ('Ingresa el primer texto aquí', 'Ingresa el segundo texto aquí', 'Ingresa el tercer texto aquí', 'Ingresa el cuarto texto aquí', 'ABRIENDO MI WEB... ');
var wordIntro = new makeSlideShow (words, 2500, '<CENTER><BR><BR><BR><BR><BR><BR><BR><BR><FONT SIZE = 5>', 'INGRESE AQUI EL URL');
var blankFrameTop = '<HTML><BODY BGCOLOR = "#000000" TEXT = "#FFFFFF">';
var blankFrameBottom = '</BODY></HTML>';
var blankFrame = blankFrameTop + blankFrameBottom;
var doneLoop = false;

</SCRIPT>
</HEAD><FRAMESET onLoad = "displayLoop()" ROWS = "100%, *" FRAMEBORDER = NO BORDER = 0>

<FRAME
SCROLLING=AUTO
SRC = "javascript:parent.blankFrame"
NAME = "draw"
MARGINWIDTH = 2
MARGINHEIGHT = 2>
</FRAMESET>
</HTML>
  #2 (permalink)  
Antiguo 03/02/2003, 22:14
Avatar de TurKa  
Fecha de Ingreso: enero-2003
Ubicación: Gerli, Avellaneda
Mensajes: 543
Antigüedad: 21 años, 3 meses
Puntos: 4
No estoy segura si servirá para este script, pero una opción sería llamar al script desde el tag <img> con OnClick:

<img src="imagen.gif" onClick="funcionScript1(); funcionScript2()">

Suponiendo que lo que está en rojo, sean las funciones del script (o parte de el) que quieras ejecutar luego del click en la imagen.
__________________
Programación LAMP con Scrum y XP
www.eugeniabahit.com.com.ar
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:30.