Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/09/2011, 17:00
JaV1
 
Fecha de Ingreso: noviembre-2010
Ubicación: Lepe
Mensajes: 23
Antigüedad: 13 años, 5 meses
Puntos: 0
Target de un formulario en Div

Hola muy buenas, tengo un problema con unos formularios y unos divs...

Soy un poko novato con el tema de la maquetacion CSS me he leido el manual de la web y he seguido los pasos necesarios para tener lo que os enseño aquí
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><link href="indice2.css" rel="stylesheet" type="text/css" />
<script src="script/java.js" type="text/javascript"></script>
<script language='javascript' type="text/javascript" src="script/popcalendar.js"></script>


<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Administracion</title>
<style type="text/css">
.auto-style1 {
	font-size: xx-large;
}
</style>
</head>

<body>
<center>
<p class="auto-style1"><strong>Administración</strong></p>
</center>

<div id="administracion"style="clear:both;">
<div id="menu"> 
<table><tr>
<td class="menu"><a href="javascript:loadoneurl('adddog.php', 'centro')">Añadir Perro</a></td>
</tr>
<tr>
<td class="menu"><a href="javascript:loadoneurl('editdog.php', 'centro')">Editar Perro</a></td>
</tr>
<tr>
<td class="menu"><a href="javascript:loadoneurl('editlocate.php', 'centro')">Localización</a></td>
</tr>
<tr>
<td class="menu"><a href="javascript:loadoneurl('editcontact.php', 'centro')">Contacto</a></td>
</tr>
<tr>
<td class="menu"><a href="logout.php">Salir</a></td></tr>
</table>
</div>


<div id="centro">

</div>
</div>
</body>

</html> 
y dentro de ese div con ID #centro
se carga este script al pulsar el boton de añadir perro.

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link href="indice2.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language='javascript' src="script/popcalendar.js"></script>

</head>

<body>
<div id="formulario">
<form name="Formulario" method="post"  target="centro" action='adddog2.php' enctype='multipart/form-data'>
<div>
<div style="float:left; width:150px;">Nombre&nbsp;&nbsp; </div>
	<div style="float:left;"><input type="text" name="Nombre" size="25" maxlength="50" /></div>
</div>
<div style="clear:both;">
<div style="float:left; width:150px;">Madre</div>
	<div style="float:left;"><input type="text" name="Madre" size="25" maxlength="50" /></div>
</div>
<div style="clear:both;">
<div style="float:left; width:150px;">Padre</div>
	<div style="float:left;"><input type="text" name="Padre" size="25" maxlength="50" /></div>
</div>

<div style="clear:both;">
<div style="float:left; width:150px;">Raza</div>
	<div style="float:left;">
		<select name="Raza" style="width:170px;">
			<option selected="selected" value="Pelo Largo">Pelo Largo</option>
			<option  value="Pelo Corto">Pelo Corto</option>
		</select>
	</div>
</div>


<div style="clear:both;">
<div style="float:left; width:150px;">Sexo</div>
	<div style="float:left;">
		<select name="Sexo" style="width:170px;">
			<option selected="selected" value="Macho">Macho</option>
			<option  value="Hembra">Hembra</option>
		</select>
	</div>
</div>


<div style="clear:both;">
<div style="float:left; width:150px;">Estado</div>
	<div style="float:left;">
		<select name="Estado" style="width:170px;">
			<option selected="selected" value="Propio">Propio</option>
			<option  value="Reservado">Reservado</option>
			<option  value="Vendido">Vendido</option>
			<option  value="Disponible">Disponible</option>
		</select>
	</div>
</div>

<div style="clear:both;">
<div style="float:left; width:150px;">Fecha de nacimiento</div>
	<div style="float:left;">
		<input name="Nacimiento" type="text" id="dateArrival" onclick="popUpCalendar(this, Formulario.dateArrival, 'yyyy-mm-dd');" size="25"/>
	</div>
</div>

<div style="clear:both;">
<div style="float:left; width:150px;">Foto</div>
	<div style="float:left;"><input type="file" name="foto" size="11" maxlength="50" /></div>
</div>


<div style="clear:both;">
<div style="float:left; width:150px;"></div>
	<div style="float:left;">
	  <input type="submit" value="Enviar" name="enviado" size="25"/>

	</div>
</div>

</form>
</div>

</body>

</html> 



Y ahora lo que necesito es que al yo pulsar ese Submit, no me recargue la web entera sino que solo me recargue el Div centro, que el menú lateral se quede ahí.


A ver quien me puede hechar una manita y que no sea al cuello.

Muchar gracias ;)