Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Gilcimar Macedo

Include virtual

Recommended Posts

Pessoal Bom dia,

 

Gostaria que vcs me auxilisse neste caso, bom gostaria de incluir de modo virtual o menu abaixo em todas as páginas que tenho de uma home para ficar mais facil tanto ao incrementar um novo topico ou Sub menu.

 

 

<html><head><title>_____ Gerenciamento de Projeto _____</title><style type="text/css">body {font: normal 11px verdana;}.ul {margin: 0;padding: 0;list-style: none;width: 218px; /* Width of Menu Items */border-bottom: 1px solid #24437a;}.ul .li {position: relative;}.li .ul {position: absolute;left: 217px; /* Set 1px less than menu width */top: 0;display: none;}/* Styles for Menu Items */.ul .li a {display: block;text-decoration: none;background: #4682B4; /* IE6 Bug */padding: 5px;border: 1px solid #DBEAF5;border-bottom: 0;font-family: Arial;font-size: 9px;font-weight: inherit;text-transform: uppercase;color: #ffffff;text-decoration: none;}/* Fix IE. Hide from IE Mac \*/* html .ul .li { float: left; height: 1%; }* html .ul .li a { height: 1%; }/* End */.ul .li a:hover { background: #4682B4; } /* Hover Styles */.li .ul .li a { padding: 2px 5px; background-color:#4682B4; } /* Sub Menu Styles */.li:hover .ul, .li.over .ul { display: block; } /* The magic */</style></head><script  type="text/javascript">startList = function() {if (document.all&&document.getElementById) {navRoot = document.getElementById("nav");for (i=0; i<navRoot.childNodes.length; i++) {node = navRoot.childNodes[i];if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over";}node.onmouseout=function() {this.className=this.className.replace(" over", "");}}}}	}window.onload=startList;</script><!-- Body --><table> <tr>  <td>	<table>		<tr>			<td>				<ul id="nav" class="ul"> 					<li class="li"><a href="#" border="0"> >>> Empresa</A>						<ul class="ul">							<li><a href="index.asp">...::: Histórico da Empresa</A> 							</li>						</ul>					</li> 											</ul>			</td>		</tr>	</table> </td></tr>			</table></body></html>

Este exemplo acima seria o menu mas não com todo o conteudo, só para exemplificar o problema.

 

Abraços.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Arquivo : Menu.asp

<table>
		<tr>
			<td>
				<ul id="nav" class="ul">
					<li class="li"><a href="#" border="0"> >>> Empresa</A>
						<ul class="ul">
							<li><a href="index.asp">...::: Histórico da Empresa</A>
							</li>
						</ul>
					</li>	 
						
				</ul>
			</td>
		</tr>
	</table>

 

 

Arquivo : Home.asp

<html>
<head>
<title>_____ Gerenciamento de Projeto _____</title>

<style type="text/css">
body {
font: normal 11px verdana;
}
.ul {
margin: 0;
padding: 0;
list-style: none;
width: 218px; /* Width of Menu Items */
border-bottom: 1px solid #24437a;
}
.ul .li {
position: relative;
}
.li .ul {
position: absolute;
left: 217px; /* Set 1px less than menu width */
top: 0;
display: none;
}
/* Styles for Menu Items */
.ul .li a {
display: block;
text-decoration: none;
background: #4682B4; /* IE6 Bug */
padding: 5px;
border: 1px solid #DBEAF5;
border-bottom: 0;
font-family: Arial;
font-size: 9px;
font-weight: inherit;
text-transform: uppercase;
color: #ffffff;
text-decoration: none;
}
/* Fix IE. Hide from IE Mac \*/
* html .ul .li { float: left; height: 1%; }
* html .ul .li a { height: 1%; }
/* End */
.ul .li a:hover { background: #4682B4; } /* Hover Styles */
.li .ul .li a { padding: 2px 5px; background-color:#4682B4; } /* Sub Menu Styles */
.li:hover .ul, .li.over .ul { display: block; } /* The magic */
</style>
</head>

<script  type="text/javascript">
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}	
}
window.onload=startList;
</script>
<!-- Body -->
<table>
<tr>
<td><!--#Include File="Menu.asp"--></td>
</tr>			
</table>
</body>
</html>

 

Essa linha <!--#Include File="Menu.asp"--> é que vai fazer a inclusão dos dados do Menu, quando for alterar você só precisa ir na Página Menu.asp e fazer as alterações necessárias

 

qualquer coisa post para maiores informações!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Ted k', deu certo da forma que você passou implementei no meu código, mas agora preciso implementar uma rotina, a rotina que quero é que em cada link principal da pagina selecionada seja apresentada na pagina atual para que quando ela queira voltar uma pagina ela clique na rotina para facilitar o caminho sem ter que ir no menu.. exemplo iMasters Fóruns > Programação > ASP.Como fazer isso?Abraços

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá amigos, tudo funcionava bem quando o arquivo "dynActiveX.js" passou a conflitar com esse menu.

 

O código do "dynActiveX.js" é este:

 

// When the page loads:window.onload = function(){if (document.getElementsByTagName) {// Get all the tags of type object in the page.var objs = document.getElementsByTagName("object");for (i=0; i<objs.length; i++) {// Get the HTML content of each object tag// and replace it with itself.objs[i].outerHTML = objs[i].outerHTML;}}}// When the page unloads:window.onunload = function() {if (document.getElementsByTagName) {//Get all the tags of type object in the page.var objs = document.getElementsByTagName("object");for (i=0; i<objs.length; i++) {// Clear out the HTML content of each object tag// to prevent an IE memory leak issue.objs[i].outerHTML = "";}}}

Quando coloco o "dynActiveX.js" primeiro, o menu não funciona e vice-versa. Alguém pode me ajudar?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Na verdade gostaria que comparasse o script do menu postado pelo Gilcimar (que o faz rodar no IExplorer) com o script que passei para saber por que não consigo rodar os dois ao mesmo tempo.Obrigado!

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.