Foros del Web » Creando para Internet » HTML »

problema con iframe

Estas en el tema de problema con iframe en el foro de HTML en Foros del Web. Hola a tod@s estoy haciendo una prueba, me gustaría que me orienten un poco... estoy usando un mod para zen cart, que permite extraer algunas ...
  #1 (permalink)  
Antiguo 16/01/2011, 08:23
 
Fecha de Ingreso: septiembre-2007
Mensajes: 41
Antigüedad: 16 años, 7 meses
Puntos: 0
problema con iframe

Hola a tod@s

estoy haciendo una prueba, me gustaría que me orienten un poco...

estoy usando un mod para zen cart, que permite extraer algunas sideboxes fuera del sitio, para mostrarlas en un html debo usar un iframe (a menos que me sugieran otra cosa!)

la cuestión es que, por un lado, con explorer me tira un error de sintaxis...

y por otro, el iframe viene con link que se abre dentro del iframe, me gustaría que se abra a pagina completa o en nueva pagina, pero no en la ventanita pequeña del iframe

la pagina donde están los iframes es:
http://littledreamswarehouse.com

y los iframes que tengo son 3 diferentes, casi abajo de todo:
what's new
featured
specials

gracias desde ya...
  #2 (permalink)  
Antiguo 16/01/2011, 10:46
Avatar de sanxuan  
Fecha de Ingreso: enero-2011
Ubicación: Gijón
Mensajes: 671
Antigüedad: 13 años, 3 meses
Puntos: 36
Respuesta: problema con iframe

Un <iframe> es esa ventanita dentro de la que se muestra otra página web (un documento HTML).
Si lo que quieres es ver ese documento HTML en la ventana del navegador lo que necesitas es un enlace o hipervínculo definido con la etiqueta <a >.
En el atributo href se indica la dirección del documento que será la que ya estés usando en el iframe.
El atributo target de esta etiqueta te permite escoger dónde quieres que aparezca la página, en la misma ventana, en otra pestaña, en una ventana nueva...
  #3 (permalink)  
Antiguo 16/01/2011, 11:21
 
Fecha de Ingreso: septiembre-2007
Mensajes: 41
Antigüedad: 16 años, 7 meses
Puntos: 0
Respuesta: problema con iframe

Entiendo... coloqué en target "_blank"
"_top"
sin embargo nada funciona... sigue abriéndose en el mismo iframe...
:(
  #4 (permalink)  
Antiguo 16/01/2011, 12:37
 
Fecha de Ingreso: septiembre-2007
Mensajes: 41
Antigüedad: 16 años, 7 meses
Puntos: 0
Respuesta: problema con iframe

bueno, solucioné lo de los iframes, había que retocar el archivo tpl en el zen cart

lo que no logro solucionar es el error de sintaxis que me trae el internet explorer, en la línea 78 de los archivos que se muestran en cada iframe.... son 3 archivos básicamente iguales... dejo aquí el código de uno de ellos.

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta
 content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Featured Items</title>
  <link href="style.css"
 rel="stylesheet" type="text/css" media="screen" />  
<script type="text/javascript"> 
 
/***********************************************
* Ajax Rotating Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
 
//To include a page, invoke ajaxinclude(files_array, "ROTATETYPE") in the BODY of page.
//* file_array is the name of the array containing your list of files to include.
//* For "ROTATETYPE", valid values are "dailyw", "dailym", and "random", for each day of the week, each day of the month, and random, respectively.
//* Included file MUST be from the same domain as the page displaying it.
 
//Enter path to list of files to display.
//For rotatetype="dailyw", there must be 7 files, and for "dailym", 31 files. Otherwise, no restriction:
 
var includefiles=["featured_sb.php"]
 
var rootdomain="http://"+window.location.hostname
 
function ajaxinclude(files_array, rotatetype){
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
var url=choosefile(files_array, rotatetype)
if (typeof files_array[url]=="undefined"){
document.write("Error: No file for this day has been found.")
return
}
else
url=files_array[url]
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
writecontent(page_request)
}
 
function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}
 
function choosefile(files_array, rotatetype){
var today=new Date()
var selectedfile=(rotatetype=="dailyw")? today.getDay() : rotatetype=="dailym"? today.getDate() : Math.floor(Math.random()*files_array.length)
if (rotatetype=="dailyw" && selectedfile==0) //if display type=="week days" and today is Sunday 
selectedfile=7
if (rotatetype=="dailyw" || rotatetype=="dailym")
selectedfile--  //remove 1 to sync with array index
return selectedfile
}
 
</script>    
</head>
<body>
<script type="text/javascript">ajaxinclude(includefiles, "random")</script>
<script type="text/javascript"><a href="ajaxinclude(includefiles, "random")" target="_top"></script>
</body>
</html>
en mozilla no hay error... no probé con otros navegadores...

Etiquetas: iframe
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 23:48.