Ir para conteúdo

Arquivado

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

fabiopereira

Menu em JavaScript

Recommended Posts

Olá Pessoal estou com um menu em javaScript que está funcionando bem, mas eu não estou conseguindo direcionar o link para dentro do IFRAME da página que criei, onde tenho que colocar o comando para ele jogar a página dentro do IFRAME.... vou colocar o font do menu pra vcs analizarem melhor...

 

 

function MM_findObj(n, d) {  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); return x;}function MM_swapImage() {  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];}}function MM_swapImgRestore() {  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() { 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 fwLoadMenus() {  if (window.fw_menu_0) return;  window.fw_menu_0 = new Menu("root",130,18,"Verdana",11,"#ffffff","#ffffff","#80B71F","#93C935","target=home");  fw_menu_0.addMenuItem("Hospedagem","'location='hospedagem.html'");  fw_menu_0.addMenuItem("Servidores Virtuais","location='virtuais.html'");  fw_menu_0.hideOnMouseOut=true;  fw_menu_0.writeMenus();}function MM_displayStatusMsg(msgStr)  {	status=msgStr; document.MM_returnValue = true;}// hpHost - scripts function mOvr(src,clrOver) { if (!src.contains(event.fromElement)) {	 src.style.cursor = 'hand';	 src.bgColor = clrOver;	} } function mOut(src,clrIn) {	if (!src.contains(event.toElement)) {	 src.style.cursor = 'default';	 src.bgColor = clrIn;	} } function mClk(src) {if(event.srcElement.tagName=='TD'){	src.children.tags('A')[0].click();}}function Imprimepagina() {	var mac = (navigator.userAgent.indexOf("Mac") != -1); 	var doc = (document.all) ? 1 : 0;	var ie_ns = (window.print) ? 1 : 0;	if (ie_ns){				// Se for netscape 4 ou ie5		window.print();	  }else if (doc && !mac){		// Se for ie4		vbPrintPage()	}else{	 				// Outros		alert("Por favor, selecione a opção Arquivo / Imprimir do menu superior para imprimir esse cupom.");	}}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}

Compartilhar este post


Link para o post
Compartilhar em outros sites

Por exemplo,onde tá 'location='hospedagem.html'você coloca 'nomeDoFrame.location.href='hospedagem.html'

Compartilhar este post


Link para o post
Compartilhar em outros sites

Cara fiz como você me explicou mesmo assim não vai.....veja abiaxo:

function fwLoadMenus() {  if (window.fw_menu_0) return;  window.fw_menu_0 = new Menu("root",130,18,"Verdana",11,"#ffffff","#ffffff","#80B71F","#93C935","target=home");  fw_menu_0.addMenuItem("Hospedagem","'home.location.href='hospedagem.html'");  fw_menu_0.addMenuItem("Servidores Virtuais","location='virtuais.html'");  fw_menu_0.hideOnMouseOut=true;  fw_menu_0.writeMenus();

Por exemplo,onde tá 'location='hospedagem.html'você coloca 'nomeDoFrame.location.href='hospedagem.html'

Cara descobri !!!!!!!!!!!!!!Somente coloca o nomeDOFrame.location='hospedagem.html'Valeu pela dica !!!!!

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.