AJAX - AYUUUUUUDAAAAA!! =(

 
Vista:
sin imagen de perfil

AYUUUUUUDAAAAA!! =(

Publicado por me (1 intervención) el 26/01/2009 06:24:08
Que tal todos oigan miren tengo una paginita con un menu, cuando haces clic sobre un icono ejecuta una funcion y el icono donde dieron clic, se cambia por otra imagen (el mismo icono pero como si estuviera presionado), y eso si lo hace, pero se ejecutan las otras funciones que debe de ser. ¿Por que hace eso? Ojala me puedan ayudar pongo mi codigo 1000 gracias a todos

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Phatfusion</title>

<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/imageMenu.js"></script>

<script src="javascript/prototype.js" type="text/javascript"></script>
<script src="javascript/scriptaculous.js" type="text/javascript"></script>
<script src="javascript/effects.js" type="text/javascript"></script>


<!--<link href="css/imageMenu.css" rel="stylesheet" type="text/css" />-->
<!--<link href="css_boton.css" rel="stylesheet" type="text/css" media="all" />-->



<!--Declaramos cual imagen se va a ver en cada boton-->
<style type="text/css">
body {
font-family: Arial, sans serif;
font-size: 11px;
}

#hand_b {
width:50px;
height:50px;
background-image: url(images/handy_sin_presionar.gif);
}

#hand_b.selected {
background-image: url(images/handy_presionado.png);
}

#placemark_b {
width:50px;
height:50px;
background-image: url(images/blu-circle.png);
}

#placemark_b.selected {
background-image: url(images/grn-circle.png);
}

#line_b {
width:50px;
height:50px;
background-image: url(images/lapiz_sin_presionar.png);
}

#line_b.selected {
background-image: url(images/lapiz_presionado.png);
}

#shape_b {
width:50px;
height:50px;
background-image: url(images/area_sin_presionar.png);
}

#shape_b.selected {
background-image: url(images/area_presionado.png);
}
</style>


<!--<h2>Ejemplo:</h2>
<div id="kwick">
<ul class="kwicks">
<li><a class="kwick opt1" href="http://www.sectorweb.net/" ></a></li>
<li><a class="kwick opt2" href="http://www.sectorweb.net/" ></a></li>
<li><a class="kwick opt3" href="http://www.sectorweb.net/" ></a></li>
<li><a class="kwick opt4" href="http://www.sectorweb.net/" ></a></li>
<li><a class="kwick opt5" href="http://www.sectorweb.net/" ></a></li>
</ul>
</div>
<br><br><br> -->


<!--
<script type="text/javascript">
var myMenu = new ImageMenu($$('#kwick .kwick'),{openWidth:60});
</script>

<div id="boton1" >
<img src="images/handy_sin_presionar.gif" id="boton1" onclick="new Effect.Pulsate(this);"/>
</div>


<div id="boton2" >
<img src="images/handy_sin_presionar.gif" id="boton2" onclick="new Effect.Highlight(this);"/>
</div>

<div id="boton3" >
<img src="images/handy_sin_presionar.gif" id="boton3" onclick="new Effect.Shake(this);"/>
</div>

<div id="boton4" >
<img src="images/handy_sin_presionar.gif" id="boton4" onclick="new Effect.Fold(this);"/>
</div>

<div id="boton5" >
<img src="images/handy_sin_presionar.gif" id="boton5" onclick="new Effect.Puff(this);"/>


</div>
-->

<!--Declaramos que todos los botones inicien en estado NO seleccionado-->
<script type="text/javascript">


function select(buttonId)
{
document.getElementById("hand_b").className="unselected";
document.getElementById("shape_b").className="unselected";
document.getElementById("line_b").className="unselected";
document.getElementById("placemark_b").className="unselected";
document.getElementById(buttonId).className="selected";
document.getElementById("Comando").value = buttonId;

}

function Parar()
{
select ("hand_b");
/*document.getElementById("hand_b").className="selected";
document.getElementById("shape_b").className="unselected";
document.getElementById("line_b").className="unselected";
document.getElementById("placemark_b").className="unselected"; */
alert("parar");
//document.getElementById("Comando").value = "parar";
//background-image: url(images/handy_presionado.png);
}

function Marca()
{
select("placemark_b");
alert("Marca");

}

function Linea()
{
select("line_b");
alert("Linea");
}

function Area()
{
select("shape_b");
alert("Area");
}

function inicializa()
{
featureTable_ = document.getElementById("featuretbody");
select("hand_b");
}
</script>

</head>

<body>


<!-- Boton para dibujar en el mapa-->
<div id="hand_b"
onclick="Parar()"/>


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

<!--Pon una marca en el mapa-->
<div id="placemark_b"
onclick="Marca()"/>
<br> <br> <br> <br>

<!--haz una linea a mano alzada-->
<div id="line_b"
onclick="Linea()"/>
<br> <br> <br> <br>

<!--dibuja una area en el mapa-->
<div id="shape_b"
onclick="Area();"/>
<br> <br> <br> <br>

<input id ="Comando" name="Comando" type="text" readonly="true" />


<input type="hidden" id="featuredetails" rows=2> </input>

<!--<p>To draw on the map, click on one of the buttons and then click on the map. Double-click to stop drawing a line or shape. Click on an element to change color. To edit a line or shape, mouse over it and drag the points. Click on a point to delete it.</p>-->
<!--<table id ="featuretable">
<tbody id="featuretbody"></tbody>
</table>-->




</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder