iframes & auswahllisten
Stefan D.
- html
hallöchen allerseits,
mein problem ist das ich in einer seite mir iframes arbeite (naja, ist ja so noch kein problem). in den iframes befindet sich die navigation. nu will ich via auswahlliste (als zusätzliche navigation) andere seiten aufrufen.
der quelltext (auszug):
[...]
<script language="JavaScript" type="text/javascript">
<!--
function Go(x)
{
if(x == "nothing")
{
document.forms[0].reset();
document.forms[0].elements[0].blur();
return;
}
else if(x == "end")
top.location.href = parent.frames[1].location;
else
{
parent.frames[1].location.href = x;
document.forms[0].reset();
document.forms[0].elements[0].blur();
}
}
//-->
</script>
</head>
<body>
<table BORDER="0" CELLSPACING="0" CELLPADDING="0" width="100%">
<tr>
<td class="center"><form action=""><select size=1 name="Auswahl" onChange="Go(this.form.Auswahl.options[this.form.Auswahl.options.selectedIndex].value)" width="250">
<option value="nothing">strafe wählen</option>
<option value="nothing">-------------------------------------------</option>
<option value="../schlagmich.html">schlag mich</option>
</select></form></td>
</tr>
</table>
[...]
aufbau der seite (auszug):
[...]
<table BORDER="0" CELLSPACING="0" CELLPADDING="0" width="100%">
<tr>
<td colspan="2" height="8"></td>
</tr>
<tr>
<td width="160"></td>
<td class="center"><img src="grafik/logo.gif" alt="" width="400" height="82"></td>
</tr>
<tr>
<td class="frame"><iframe src="navi/navi.html" name="navi" width="160" height="350" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></iframe></td>
<td><table BORDER="0" CELLSPACING="0" CELLPADDING="0" width="100%">
<tr>
<td class="aktiv">bla</td>
</tr>
<tr>
<td class="frame"><iframe src="navi/auswahlliste.html" name="programm" width="100%" height="30" scrolling="no" marginheight="0" marginwidth="0" frameborder="0"></iframe></td>
</tr>
<tr>
<td class="zentrum">blablabla</td>
</tr>
</table>
[...]
danke euch schon mal
stefan d.
Nachtrag: so wie es ist wird mir die angesteuerte Seite in einer der iframes angezeigt ...
Hi!
mein problem ist das ich in einer seite mir iframes arbeite (naja, ist ja so noch kein problem)
Doch, für Lynx-Nutzer ist das ein kleineres (zumindest wenn die iframes vernünftig benannt sind) und für w3m-, Netscape4- und (vermutlich) Screenreader-Nutzer ein größeres Problem.
Das Skript kapier ich nicht so ganz im Zusammenhang mit der Seite...
<script language="JavaScript" type="text/javascript">
^^^^^^^^^^^^^^^^^^^^^-weg damit!
<!--
function Go(x)
{
if(x == "nothing")
{
document.forms[0].reset();
document.forms[0].elements[0].blur();
return;
}
else if(x == "end")
top.location.href = parent.frames[1].location;
else
{
parent.frames[1].location.href = x;
top.location.href = x;
(ist zumindest die Antwort auf Deine Frage, denke ich - sie war nicht so richtig klar...)
document.forms[0].reset();
document.forms[0].elements[0].blur();
diese 2 Zeilen weg
(...)
<option value="../schlagmich.html">schlag mich</option>
Paß mit den Pfadangaben auf, das sieht nach ner potentiellen Fehlerquelle aus...
Schönen Gruß
Rainer
(der ja eigentlich nicht mehr gerne bei Javascriptfragen hilft...)
jo, geht ...
firma dankt, spek bezahlt