Foros del Web » Programando para Internet » Javascript »

Cargar contenido php en menu tabs

Estas en el tema de Cargar contenido php en menu tabs en el foro de Javascript en Foros del Web. Hola a todo amigos foreros, espero me puedan ayudar, estoy realizando un menu tabs con css y javascript, el menu y esta completo y no ...
  #1 (permalink)  
Antiguo 27/01/2011, 11:11
Usuario no validado
 
Fecha de Ingreso: diciembre-2010
Ubicación: Querétaro
Mensajes: 12
Antigüedad: 13 años, 3 meses
Puntos: 0
Exclamación Cargar contenido php en menu tabs

Hola a todo amigos foreros, espero me puedan ayudar, estoy realizando un menu tabs con css y javascript, el menu y esta completo y no tiene error, el problema que presento es cuando quiero insertarle un archivo PHP por medio de un include da error y no se muestran las pestañas, quisiera saber si es posible realizar esto sin tener que hacerlo por medio de frames...
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  4. <title>sample</title>
  5. <style type="text/css"  >
  6. html, body {
  7.     width : 100%;
  8.     height : 100%;
  9.     padding : 0;
  10.     margin : 10px;
  11.     overflow : hidden;
  12.     font-family:"Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; /* MAIN BODY FONTS */
  13. }
  14. .jcTab { width:100%; height:100%;}
  15. <!-- link href="css/core.css" rel="stylesheet" type="text/css"/ -->
  16. <link href="css/TabPanel.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="src/jquery.js"></script>
  18. <script type="text/javascript" src="src/Plugins/Fader.js"></script>
  19. <script type="text/javascript" src="src/Plugins/TabPanel.js"></script>
  20. <script type="text/javascript" src="src/Plugins/Math.uuid.js"></script>
  21.  
  22. <script type="text/javascript" >
  23. var tabpanel;  
  24. var jcTabs = [ //Aqui se carga el contenido html o php (y es donde tengo el problema)
  25. '<iframe src="http://www.google.com" width="100%" height="100%" frameborder="0"></iframe>',
  26. '<iframe src="terminologia2.php" whidth="100%" height="100%" frameborder="0"></iframe>',
  27. 'You can close me by click fork button',
  28. 'You cant see it'
  29. ];
  30.  
  31. $(document).ready(function(){  
  32.     tabpanel = new TabPanel({  
  33.         renderTo:'tab',  
  34.         width:600,  
  35.         height:500,  
  36.         //border:'none',  
  37.         active : 0,
  38.         //maxLength : 10,  
  39.         items : [
  40.             {id:'toolbarPlugin1',title:'Google',html:jcTabs[0],closable: false},  
  41.             {id:'toolbarPlugin2',title:'Tab2',html:jcTabs[1],closable: false},  
  42.             {id:'toolbarPlugin3',title:'Closable',html:jcTabs[2],closable: false},  
  43.             {id:'toolbarPlugin6',title:'Disabled',html:jcTabs[3],closable: false, disabled:false}
  44.         ]
  45.     });  
  46. });
  47. </head>
  48.  
  49.  <div id="tab"></div>
  50.  <div >
  51.  
  52.  </div>
  53. </body>
  54. </html>
Espero alguna respuesta muchas gracias!!!
  #2 (permalink)  
Antiguo 27/01/2011, 14:07
 
Fecha de Ingreso: diciembre-2009
Ubicación: Valparaíso
Mensajes: 118
Antigüedad: 14 años, 4 meses
Puntos: 3
Respuesta: Cargar contenido php en menu tabs

q error precisamente te muestra???
puede q tengas mal indicado donde tienes tu archivo...
  #3 (permalink)  
Antiguo 27/01/2011, 14:29
Usuario no validado
 
Fecha de Ingreso: diciembre-2010
Ubicación: Querétaro
Mensajes: 12
Antigüedad: 13 años, 3 meses
Puntos: 0
Respuesta: Cargar contenido php en menu tabs

jjejee no pues ese es el detalle, que no se muestra ningun erros cuando hago el include con php. los archivos estan bien hubicados

lo que hago es esto, pero al correrlo no se muestra nada
Código Javascript:
Ver original
  1. var tabpanel;  
  2. var jcTabs = [ //Aqui se carga el contenido html o php (y es donde tengo el problema)
  3. '<iframe src="http://www.google.com" width="100%" height="100%" frameborder="0"></iframe>',
  4. '<iframe src="terminologia2.php" whidth="100%" height="100%" frameborder="0"></iframe>',
  5. '<?php include('archivo.php'); ?>',//asi intento incluir el archivo
  6. 'You cant see it'
  7. ];
tambien intente poner doble comillas pero nada...
  #4 (permalink)  
Antiguo 27/01/2011, 14:40
 
Fecha de Ingreso: diciembre-2009
Ubicación: Valparaíso
Mensajes: 118
Antigüedad: 14 años, 4 meses
Puntos: 3
Respuesta: Cargar contenido php en menu tabs

mmmm :/ no se si se pueda hacer eso.....
para q quieres hacer un include dentro de un tab???

prueba con require


lee esto.... http://www.ignside.net/man/php/include.php

Etiquetas: contenido, php, tabs
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:05.