art-d-sign
-


Hinweise


Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten
Alt 22.07.2005, 11:46   #1
TP-Senior
 
Benutzerbild von madace
 
Registriert seit: Jan 2003
Ort: Frankfurt/M.
madace ist auf einem guten Weg
Question

Frames-Problem (öffnet woanders als er soll)


Moin Jungs und Mädels,

folgendes Problem:

ich habe eine Seite, bestehend aus home.html und nav.html (inhalte folgen weiter unten).
home ist für den "content" zuständig, nav für die Navigation.

Das Problem ist nun, daß Links die in home.html aufgerufen werden korrekt geöffnet werden, bei klicks auf/in links in nav.html aber diese Links nicht im Frame home.html aufgehen, sondern in einem neuen Fenster und dort die Ursprungsseite (von wo kopiert wurde) aufgerufen wird.

home.html:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
		<meta name="generator">
		<title>LALAter</title>
		<link href="styles.css" rel="stylesheet" media="screen">
		<script>if (parent.location.href == self.location.href) {window.location.href = document.URL}</script>
		<csscriptdict import>
			<script type="text/javascript" src="GeneratedItems/CSScriptLib.js"></script>
		</csscriptdict>
		<csactiondict>
			<script type="text/javascript"><!--
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		titel_01_over = newImage('Bilder/titel_01-over.png');
		titel_02_over = newImage('Bilder/titel_02-over.png');
		titel_03_over = newImage('Bilder/titel_03-over.png');
		preloadFlag = true;
	}
}

// --></script>
		</csactiondict>
	</head>
			<body onload="preloadImages();" bgcolor="#00A0C6" leftmargin="0" topmargin="0" rightmargin="0" marginwidth="0" marginheight="0">
		<table width=607 border=0 cellpadding=0 cellspacing=0 bgcolor="white" height="675">
			<tr height="522">
				<td colspan=2 valign="bottom" height="522">
					<table width="517" border="0" cellspacing="0" cellpadding="0">
						<tr height="522">
							<td valign="bottom" bgcolor="white" width="609" height="522" ><img src="images/1pixweiss.gif" alt="" height="5" width="608" border="0">
								<table width="562" border="0" cellspacing="0" cellpadding="0" height="493">
									<tr height="65">
										<td valign="top" width="84" height="65"></td>
										<td valign="top" width="518" height="65">
											<div align="right">
												<a href="./" target=_top><img src="images/logo.gif" alt="" height="65" width="109" border="0"></a></div>
										</td>
									</tr>
									<tr height="39">
										<td valign="top" width="84" height="39"></td>
										<td valign="top" width="518" height="39">
											<h3>ILALAng</h3>
										</td>
									</tr>
									<tr height="98">
										<td valign="top" width="84" height="98">
											<div align="right">
												 </div>
										</td>
										<td valign="top" width="518" height="98"><span class="fliesstext"><a href="http://www.hidedenlink.de" target="_blank">ZLALAng</a> isfgfdgfgin. </span><span class="fliesstext">Afgfgfgnserem Leistungsspektrum. Die fofgfdgfggeich.  </span></td>
									</tr>
									<tr height="291">
										<td colspan="2" valign="top" width="602" height="291">
										<table id="Tabelle_01" width="602" height="270" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<a href="1.html" onFocus="this.blur();"
				onmouseover="changeImages('titel_01', 'Bilder/titel_01-over.png'); return true;"
				onmouseout="changeImages('titel_01', 'Bilder/titel_01.png'); return true;"
				onmousedown="changeImages('titel_01', 'Bilder/titel_01-over.png'); return true;"
				onmouseup="changeImages('titel_01', 'Bilder/titel_01-over.png'); return true;">
				<img name="titel_01" src="Bilder/titel_01.png" width="226" height="270" border="0" alt=""></a></td>
		<td>
			<a href="2.html" onFocus="this.blur();"
				onmouseover="changeImages('titel_02', 'Bilder/titel_02-over.png'); return true;"
				onmouseout="changeImages('titel_02', 'Bilder/titel_02.png'); return true;"
				onmousedown="changeImages('titel_02', 'Bilder/titel_02-over.png'); return true;"
				onmouseup="changeImages('titel_02', 'Bilder/titel_02-over.png'); return true;">
				<img name="titel_02" src="Bilder/titel_02.png" width="196" height="270" border="0" alt=""></a></td>
		<td>
			<a href="3.html" onFocus="this.blur();"
				onmouseover="changeImages('titel_03', 'Bilder/titel_03-over.png'); return true;"
				onmouseout="changeImages('titel_03', 'Bilder/titel_03.png'); return true;"
				onmousedown="changeImages('titel_03', 'Bilder/titel_03-over.png'); return true;"
				onmouseup="changeImages('titel_03', 'Bilder/titel_03-over.png'); return true;">
				<img name="titel_03" src="Bilder/titel_03.png" width="180" height="270" border="0" alt=""></a></td>
	</tr>
</table></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
				<td height="522"><img src="images/spacer.gif" width=1 height=498 alt=""></td>
			</tr>
			<tr>
				<td width="166"></td>
				<td rowspan=2><img src="images/unten2.gif" width=442 height=178 alt=""></td>
				<td><img src="images/spacer.gif" width=1 height=51 alt=""></td>
			</tr>
			<tr>
				<td width="166"><img src="images/unten1.gif" width=166 height=127 alt=""></td>
				<td><img src="images/spacer.gif" width=1 height=127 alt=""></td>
			</tr>
		</table>
	</body>
</html>
nav.html:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="inhalte-type" inhalte="text/html;charset=ISO-8859-1">
		<meta name="generator">
		<title>z&gfsgfger</title>
	
<script language="JavaScript" type="text/JavaScript">
<!--
var active = 0;

function preloadImages() {
	var d=document; if(d.images){ if(!d.p) d.p=new Array();
	var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function swapImgRestore() {
	var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function 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=findObj(n,d.layers[i].document);
	if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function swapImage() {
	var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function clickItem(num) {
	if (num != active)
	{
		document['symbol'].src = 'images/symbol' + num + '.jpg';
		if (active > 0) document['kopf' + active].src = 'images/kopf.gif';
		if (num > 0)
		{
			document['kopf' + num].src = 'images/flamme_zuend.gif';
			active = num;
			window.setTimeout("loop()", 500);
			
			if (document.mySound) MM_controlSound('play','document.CS1066837547646','1111.wav')
			else 
			{
				document.getElementById("sound").Stop();
				document.getElementById("sound").Run();
			}
		}
	}
}

function loop() {
	document['kopf' + active].src = 'images/flamme_loop.gif';
}



<!-- nur f¸r Netscape benutzt -->
function MM_controlSound(x, _sndObj, sndFile) { //v3.0
  var i, method = "", sndObj = eval(_sndObj);
  if (sndObj != null) {
    if (navigator.appName == 'Netscape') method = "play";
    else {
      if (window.MM_WMP == null) {
        window.MM_WMP = false;
        for(i in sndObj) if (i == "ActiveMovie") {
          window.MM_WMP = true; break;
      } }
      if (window.MM_WMP) method = "play";
      else if (sndObj.FileName) method = "run";
  } }
  if (method) eval(_sndObj+"."+method+"()");
  else window.location = sndFile;
}
//-->
</script>
</head>
		
<body bgcolor="#00a0c6" leftmargin="0" topmargin="0" rightmargin="0" marginwidth="0" marginheight="0" onLoad="preloadImages('images/navh_01.gif','images/navh_02.gif','images/navh_03.gif','images/navh_04.gif','images/navh_05.gif','images/symbol1.jpg','images/symbol2.jpg','images/symbol3.jpg','images/symbol4.jpg','images/symbol5.jpg', 'images/flamme_zuend.gif', 'images/flamme_loop.gif')">
<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0>
  <TR> 
    <TD COLSPAN=2 width="186"><IMG SRC="images/1pixweiss.gif" WIDTH=186 HEIGHT=90 ALT=""></TD>
    <TD COLSPAN=2 width="150"><IMG SRC="images/obenkurve.gif" WIDTH=150 HEIGHT=90 ALT=""></TD>
    <TD ROWSPAN=8><IMG SRC="images/verlauf.gif" WIDTH=800 HEIGHT=580 ALT=""></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/1pixweiss.gif" WIDTH=60 HEIGHT=183 ALT=""></TD>
    <TD COLSPAN=3 width="276"><IMG SRC="images/symbol0.jpg" WIDTH=276 HEIGHT=183 ALT="" onClick="clickItem(0)" name="symbol" id="symbol"></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/kopf.gif" WIDTH=60 HEIGHT=42 ALT="" name="kopfl" id="kopf1"></TD>
    <TD width="126"><a href="1.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/streichholz.gif" WIDTH=126 HEIGHT=42 ALT="" onMouseOver="swapImage('navImg1','','images/navh_01.gif',1)" onMouseOut="swapImgRestore()" border="0" onClick="clickItem(1)"></a></TD>
    <TD ROWSPAN=5 width="27"><IMG SRC="images/nav_08.gif" WIDTH=27 HEIGHT=210 ALT=""></TD>
    <TD width="123"><a href="1.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/nav1.gif" ALT="" name="navImg1" WIDTH=123 HEIGHT=42 id="navImg1" onMouseOver="swapImage('navImg1','','images/navh_01.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(1)" border="0" onclick="if(document.all) this.blur();"></a></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/kopf.gif" WIDTH=60 HEIGHT=42 ALT="" name="kopf2" id="kopf2"></TD>
    <TD width="126"><a href="2.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/streichholz.gif" WIDTH=126 HEIGHT=42 ALT="" onMouseOver="swapImage('navImg2','','images/navh_02.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(2)" border="0" onclick="if(document.all) this.blur();"></a></TD>
    <TD width="123"><a href="2.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/nav2.gif" ALT="" name="navImg2" WIDTH=123 HEIGHT=42 id="navImg2" onMouseOver="swapImage('navImg2','','images/navh_02.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(2)" border="0" onclick="if(document.all) this.blur();"></a></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/kopf.gif" WIDTH=60 HEIGHT=42 ALT="" name="kopf3" id="kopf3"></TD>
    <TD width="126"><a href="3.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/streichholz.gif" WIDTH=126 HEIGHT=42 ALT="" onMouseOver="swapImage('navImg3','','images/navh_03.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(3)" border="0" onclick="if(document.all) this.blur();"></a></TD>
    <TD width="123"><a href="3.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/nav3.gif" ALT="" name="navImg3" WIDTH=123 HEIGHT=42 id="navImg3" onMouseOver="swapImage('navImg3','','images/navh_03.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(3)" border="0" onclick="if(document.all) this.blur();"></a></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/kopf.gif" WIDTH=60 HEIGHT=42 ALT="" name="kopf4" id="kopf4"></TD>
    <TD width="126"><a href="4.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/streichholz.gif" WIDTH=126 HEIGHT=42 ALT="" onMouseOver="swapImage('navImg4','','images/navh_04.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(4)" border="0" onclick="if(document.all) this.blur();"></a></TD>
    <TD width="123"><a href="4.html" target="inhalte" onFocus="this.blur()"><IMG SRC="images/nav4.gif" ALT="" name="navImg4" WIDTH=123 HEIGHT=42 id="navImg4" onMouseOver="swapImage('navImg4','','images/navh_04.gif',1)" onMouseOut="swapImgRestore()" onClick="clickItem(4)" border="0" onclick="if(document.all) this.blur();"></a></TD>
  </TR>
  <TR> 
    <TD width="60"><IMG SRC="images/1pixweiss.gif" WIDTH=60 HEIGHT=42 ALT="" name="kopf5" id="kopf5"></TD>
    <TD width="126"><IMG SRC="images/1pixweiss.gif" WIDTH=126 HEIGHT=42 ALT=""></TD>
    <TD width="123"><IMG SRC="images/navh_05.gif" ALT="" name="navImg5" WIDTH=123 HEIGHT=42 id="navImg5"></TD>
  </TR>
  <TR> 
    <TD COLSPAN=4 width="336"><IMG SRC="images/nav_22.gif" WIDTH=336 HEIGHT=97 ALT=""></TD>
  </TR>
</TABLE>
<!-- IE -->
<object id="sound" width="0" height="0" classid="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A">
  <param name="FileName" value="1111.wav">
  <param name="PlayCount" value="1">
  <param name="AutoStart" value="0">
  <param name="ShowControls" value="1">
  <param name="ShowDisplay" value="0">
</object>
<!-- Netscape -->
<EMBED NAME='CS1066837547646' SRC='1111.wav' LOOP=false AUTOSTART=false MASTERSOUND HIDDEN=true WIDTH=0 HEIGHT=0></EMBED> 
</body>
</html>

index.php
Code:
<?php	if ($frame) {$frame=explode("/",$frame);$load=$frame[count($frame)-1];} else {$load = "home.html";} ?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">
		<meta name="generator">
		<title>zfhgM</title>
		<link rel="SHORTCUT ICON" href="favicon.ico" type="image/ico">
		<script language="JavaScript" type="text/JavaScript">
		top.moveTo(0,0);
		top.resizeTo(980, 835);
		</script>
	</head>
	<frameset border="0" cols="607,*" frameborder="no" framespacing="0">
		<frame name="inhalte" noresize scrolling="no" src="<?=$load?>">
		<frame name="inhalte" scrolling="no" src="nav.html">
	</frameset>
	<body bgcolor="#ffffff">
		<noframes>
      <? include("noframes.html") ?>
		</noframes>
	</body>
</html>
Wäre super wenn mir einer sagen könnte woran das liegt.

Hab' schon mit diversen relativen und absoluten Pfadangaben versucht, "frame" umbenannt, aber er macht es immer wieder daß er bei klick auf links in nav.html ein neues Fenster öffnet, statt es im Bereich von home.html aufzumachen.

Grüße,
madace


PS: Seite wurde nicht von mir erstellt, sondern kopiert und modifiziert.
Uns ich such mir hier jetzt den Wolf wg. dem Fehler. Also Nachsicht bitte.
__________________
"Das Gewissen ist die Stimme der Seele. (J.J. Rousseau)"
madace ist offline   Mit Zitat antworten


Alt 22.07.2005, 12:06   #2
TP-Moderator
 
Benutzerbild von Adromir
 
Registriert seit: Jun 2004
Ort: Hannover
Adromir ist ein richtiges Arbeitstier - DANKEAdromir ist ein richtiges Arbeitstier - DANKEAdromir ist ein richtiges Arbeitstier - DANKEAdromir ist ein richtiges Arbeitstier - DANKEAdromir ist ein richtiges Arbeitstier - DANKEAdromir ist ein richtiges Arbeitstier - DANKE
Der Frame mit der Navigation und der Frame mit den Inhalten heißen genau gleich, nämlich "inhalte".

Nenne den Frame mit der nav.html z.B. in navigation um und schon sollte es funktionieren.
Desweiteren würde ich dir empfehlen, den Code nachzubessern und z.B. um alle Attribute Doublequotes ( " ) machen..
Adromir ist offline   Mit Zitat antworten
Alt 22.07.2005, 13:05   #3
TP-Senior
 
Benutzerbild von madace
 
Registriert seit: Jan 2003
Ort: Frankfurt/M.
madace ist auf einem guten Weg
Thumbs up

Zitat:
Zitat von Adromir
Der Frame mit der Navigation und der Frame mit den Inhalten heißen genau gleich, nämlich "inhalte".

das war's! thanx!
__________________
"Das Gewissen ist die Stimme der Seele. (J.J. Rousseau)"
madace ist offline   Mit Zitat antworten
Antwort

  Aktuelles Thema
  TP Hilfe Forum > Web-Editoren & Coding > HTML Puristen
Frames-Problem (öffnet woanders als er soll) Frames-Problem (öffnet woanders als er soll)
« Problem mit Tabellenbreite im IE | Ctr. + S »

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 04:56 Uhr.

Powered by: vBulletin Version 3.7 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd. / Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Traum-Projekt.com | Suchen | Archiv | Impressum | Kontakt | | | Nach oben |



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67