Ver Mensaje Individual
  #5 (permalink)  
Antiguo 29/01/2007, 01:56
Joloooos
 
Fecha de Ingreso: octubre-2006
Mensajes: 185
Antigüedad: 17 años, 6 meses
Puntos: 0
Re: Funcion y funcion.

Voy a intentar una cosa pero resolver esto seria interesante.
Bueno aqui es desde donde se llama a la funcion.

<a href="hola.html;" target="localscene" onMouseOver="msover1('imageA','bot/botons.gif');cambio();" onMouseOut="msout1('imageA','bot/botonn.gif');"><img name='imageA' src=bot/botonn.gif height=20 border=0></a>

y aqui esta el script con la precarga y el cambio de boton, y por ultimo la opcion de hacer visible:



<SCRIPT LANGUAGE="JavaScript">
//Funciones cambio tabla
//primera opcion para el cambio de visibility
function submenu()
{
foto.style.visibility="visible";
}
//Funciones precarga y cambio de botones
<!--//

// Browser Detection
browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version >= 3.0) { roll = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) { roll = 'true'; }
else { roll = 'false'; }

// Preload images.
if (roll == 'true') {

// Donde estan y el nombre de las imagenes.

var imglist = new Array (
"bot/boton_ini_s.gif",
"bot/boton_ini_n.gif",
"bot/boton_anun_n.gif",
"bot/boton_anun_s.gif",
"bot/boton_enseñ_n.gif",
"bot/boton_enseñ_s.gif",
"bot/boton_secre_n.gif",
"bot/boton_secre_s.gif",
"bot/boton_extras_n.gif",
"bot/boton_extras_s.gif",
"mapa.gif"
);
var imgs = new Array();

var count;
if (document.images)
for (count=0; count<imglist.length; count++)
{imgs[count]=new Image(); imgs[count].src=imglist[count];}
}

function msover1(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }
function msout1(img,ref) { if (roll == 'true') { document.images[img].src = ref; } }

//-->

//Una de las opciones para el cambio de la opcion visibilty.
function cambio()
{

document.getElementById('foto').style.visibility=" visible";
}
</SCRIPT>

este es el script. no se pq falla pq como vereis hay dos opciones de cambio, la de cambio y la de submenu. y de ninguna de las dos maneras me ha funcionado y no se pq.