Ir para conteúdo
Fórum Script Brasil
  • 0

Duvida


Gnomo

Pergunta

Coe galera..

seguinte to com um certo problema..

eu peguei um codigo aqui de uma pagina

que te um topo e o conteudo da pagina

é um iframe so que o iframe não tem

especificando WIDTH nem HEIGHT só

que o iframe aumenta de acordo com

a resoluçao.. e também não tem nenhum

codigo em javascript para fazer isto..

O codigo abaixo é da página inicial

<HTML>
<HEAD>
<LINK rel=stylesheet type=text/css href=css/Principal.css>
<script language=JavaScript src=js/Principal.js></SCRIPT>
</HEAD>
<BODY SCROLL=no>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0 height=100%><TR><TD>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0 height=35 id=logotop bgcolor=#a6caf0><TR><TD>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0><TR><TD colspan=2><IMG height=1 src=img/b.gif width=1 ></TD></TR><TR>
<TD width=100% align=left><A href=http://www.syscomputing.com.br/ target=_blank><IMG height=34 src=img/logo-syscomputing.gif width=166 border=0 ><IMG height=34 src=img/logo-sistema.gif width=173 border=0 ></A></TD>
<TD align=right><A href="Default.asp?aco=logout"><IMG alt="Sair do Sistema" src=img/bt-tp-logout.gif width=68 height=34 border=0></A><!--<A href="#"><IMG alt="Ajuda para utilizar o sistema" src=img/bt-tp-ajuda.gif width=68 height=34 border=0></A>--><IMG height=1 src=img/b.gif width=5></TD>
</TR></TABLE>
</TD></TR></TABLE>
<TABLE width=100% border=0 cellpadding=0 cellspacing=0 height=25 background=img/fundo-mn.gif bgcolor=#808080><TR>
<TD width=10><IMG height=25 src=img/b.gif width=10 ></TD>
<TD width=100% nowrap><NOBR><B>Usuário:</B> <%=Request.Cookies("Seguranca")("AdminNome")%></NOBR></TD>
<TD id=menubarra></TD>
</TR></TABLE>
</TD></TR>
<TR><TD height=100%>
<IFRAME name=admin id=admin frameborder=0 FRAMESPACING=0></IFRAME>
</TD></TR></TABLE>
</BODY>
</HTML>
O codigo abaixo é do Principal.js
if(window.top != window.self){
	window.top.location = window.self.location;
}

var Menus = new Array(5);
Menus[0] = new Menu('Conteúdo','Conteudo.asp');
Menus[1] = new Menu('Intranet','Intranet.asp');
Menus[2] = new Menu('Marketing','Marketing.asp');
Menus[3] = new Menu('Relatórios','Relatorios.asp');
Menus[4] = new Menu('Administração','Administradores.asp');

function window.onload() {
	Muda(0);
}

function GeraMenu() {
	var strFinal = '';
	strFinal = strFinal + '<TABLE border=0 cellpadding=0 cellspacing=0 height=25><TR>';
	for (i = 0; i < Menus.length; i++) {
  if(Menus[i].status == true) {
  	strFinal = strFinal + '<TD id=' + Menus[i].tid + '><TABLE border=0 cellpadding=0 cellspacing=0><TR><TD><IMG height=25 src=img/mn-sel-e.gif width=2></TD><TD background=img/mn-sel-f.gif valign=bottom><SPAN class=mn-sel>' + Menus[i].nome + '</SPAN><BR><IMG height=3 src=img/b.gif width=1></TD><TD><IMG height=25 src=img/mn-sel-d.gif width=1></TD></TR></TABLE></TD>';
  } else {
  	strFinal = strFinal + '<TD id=' + Menus[i].tid + '><A class=mplk href="javascript:Muda(' + i + ');"><SPAN class=mn-t1>' + Menus[i].nome + '</SPAN><BR><SPAN class=mn-t2 id=' + Menus[i].gid + '>' + Menus[i].nome + '</SPAN><BR></A></TD>';
  }
  if ((i + 1) < Menus.length) 
  	if(Menus[i].status == false && Menus[i + 1].status == false)
    strFinal = strFinal + '<TD><FONT class=mn-sep>|</FONT></TD>';
	}
	strFinal = strFinal + '</TR></TABLE>';
	return strFinal;
}

function Menu(nome, link) {
	d = new Date();
	r = Math.ceil(Math.random() * 10);
	this.nome = nome;
	this.link = link;
	this.gid = 'mnid' + d.getTime() + '_' + r;
	this.tid = 'tdid' + d.getTime() + '_' + r;
	this.status = false;
}

function Muda(mn) {
	for (i = 0; i < Menus.length; i++) {
  Menus[i].status = false;
	}
	Menus[mn].status = true;
	menubarra.innerHTML = GeraMenu();
	window.admin.document.location = Menus[mn].link;
} 
O que eu sei q o codigo SRC do iframe ele puxa do javascript:
function window.onload() {
	Muda(0);
}

mais não sei de onde ele puxa o tamanho certo da página.

A pergunta é.. porque o iframe redimenciona sem o uso dos códigos

WIDTH e HEIGHT e também sem algum codigo de javascript???

Desde já agradeço;

GnomO!

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,7k
×
×
  • Criar Novo...