Hola,
tengo un problema al diseñar un sitio que estaba hecho con iframes, ahora lo estoy pasando a DIV´s, pero tengo un problema cuando quiero que desde la botonera (un accordion c/jquery) me cargue el contenido a un DIV sin cargar todo cada vez.
Probe con ajax, con un iframe solo en ese div, pero no puedo lograr que la botonera me cargue los links en el div "maincontent", este es mi codigo:
Código HTML:
Ver original<!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"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="estilo/twoColFixLtHdr.css" rel="stylesheet" type="text/css" /> <!--[if IE 5]>
<style type="text/css">
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="SpryAssets/jquery.js"></script> <script type="text/javascript"> <!--//---------------------------------+
// Developed by Roshan Bhattarai
// Visit http://roshanbh.com.np for this script and more.
// This notice MUST stay intact for legal use
// --------------------------------->
$(document).ready(function()
{
//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
$("#firstpane p.menu_head").click(function()
{
$(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(left.png)"});
});
//slides the element with class "menu_body" when mouse is over the paragraph
$("#secondpane p.menu_head").mouseover(function()
{
$(this).css({backgroundImage:"url(down.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
$(this).siblings().css({backgroundImage:"url(left.png)"});
});
});
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
<body class="twoColFixLtHdr" onload="loadurl('patentes.html','maincontent')">
<script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','940','height','173','src','login','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','login' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="940" height="173"> <param name="movie" value="login.swf" /> <param name="quality" value="high" /> <embed src="login.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="940" height="173"></embed> <!-- end #header --></div> <h3><div style="float:left" > <!--This is the first division of left--> <div id="firstpane" class="menu_list"> <!--Code for menu starts here--> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','images/botonera_ov_01.jpg',1)"><img src="images/botonera_01.jpg" name="Image10" width="263" height="23" border="0" id="Image10" onclick="javascript:parent.contentFrame.location.href='./content/estudiobarbat.html'"/></a></p> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/whywork.html'">TRABAJAR CON NOSOTROS.
</div></a> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/historia.html'">HISTORIA
</div></a> <p class="menu_head"><a href="javascript:parent.contentFrame.location.href='./content/servicios.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('servicios','','images/botonera_ov_02.jpg',1)"><img src="images/botonera_02.jpg" alt="Servicios" name="servicios" width="263" height="23" border="0" id="servicios" onclick="javascript:parent.contentFrame.location.href='./content/servicios.html'"/></a></p> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Staff','','images/botonera_ov_03.jpg',1)"><img src="images/botonera_03.jpg" alt="Staff" name="Staff" width="263" height="23" border="0" id="Staff" onclick="javascript:parent.contentFrame.location.href='./content/staff_lista.html'"/></a></p> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('News','','images/botonera_ov_04.jpg',1)"><img src="images/botonera_04.jpg" alt="News & Publications" name="News" width="263" height="23" border="0" id="News" /></a></p> <a href="#"><div onclick="javascript:parent.maincontent.location.href='./content/mediacion.html'">PUBLICACIONES.
</div></a> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/oposiciones.html'">FAQ.
</div></a> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/prevencion.html'">DOWNLOADS.
</div></a> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('login','','images/botonera_ov_06.jpg',1)"><img src="images/botonera_06.jpg" name="login" width="263" height="23" border="0" id="login" onclick="javascript:parent.contentFrame.location.href='./content/links.html'"/></a></p> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Links','','images/botonera_ov_05.jpg',1)"><img src="images/botonera_05.jpg" name="Links" width="263" height="23" border="0" id="Links" onclick="javascript:parent.contentFrame.location.href='./content/contacto.html'"/></a></p> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/mediacion.html'">BUENOS AIRES.
</div></a> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/oposiciones.html'">ROSARIO.
</div></a> <a href="#"><div onclick="javascript:parent.contentFrame.location.href='./content/prevencion.html'">MENDOZA.
</div></a> <p class="menu_head"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links','','images/botonera_ov_07.jpg',1)"><img src="images/botonera_07.jpg" name="links" width="263" height="23" border="0" id="links" onclick="javascript:parent.contentFrame.location.href='./content/login.html'"/></a></p> </div> <!--Code for menu ends here--> <!-- end #sidebar1 --></div> <iframe src="content/marcas.html" name="contenido" frameborder="0" scrolling="Auto" noresize="noresize" align="left" width="687px" height="500px" border="0px"></iframe>
<!-- end #mainContent --></div> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --><br class="clearfloat" /> <p><img src="images/fondo.jpg" width="947" height="10" /><img src="images/barbat_06.jpg" width="947" height="27" /></p>
Si me pueden indicar como cargar los links en un div de la misma pagina lo agradezco.
Saludos,