• Das Erstellen neuer Accounts wurde ausgesetzt. Bei berechtigtem Interesse bitte Kontaktaufnahme über die üblichen Wege. Beste Grüße der Admin

Öffnen in anderen FRAME - error

staedler

New member
Ich habe zwei ganz simple fragen und doch ist sie (für mich jedenfalls) schwierig. sie ist für mich entscheidend Wichtig da meine hp darauf aufgebaut ist!!- also helft mir bitte !!!
1. wie kann ich in DIESEM javascript (Auswahlbox) bestimmen in welchem FRAME das Ziel geöffnet weden soll ???
2. zeigt es immer ein 'JavaScript error' an -also wo ist der Fehler ???!!!


<head>
<script language="JavaScript">
<!--
function go()
if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {
parent."main".location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value
}
}
//-->
</script>

<script language="JavaScript">
<!--
document.write('<form name="selecter"><select name="select1" size=1 onChange="go()">');
document.write('<option value=none>Wähle eine Kategorie ...');
document.write('<option value=none>-------------------------');
document.write('<option value="blond.html">Blondinen');
document.write('<option value="aethiop.html">Äthiopier');
document.write('<option value="abstrackt.html">Abstrackt');
document.write('<option value="oestr.html">Österreicher');
document.write('<option value="bilder.html">Cartoons');
document.write('<option value="sonst.html">Sonstige');
document.write('</select>');
document.write('<br>');
document.write('<INPUT TYPE="button" VALUE="Go" onclick="go()">');
document.write('</form>');
//-->
</script>
</head>
 
Versuch mal für "main" den Framenamen einzsetzen ohne " " in dem du die Seite öffnen willst. Dann müßte es klappen und auch der Fehler wäre weg!
 
hi,

so ich hab dir das Teil mal umgeschrieben,es sollte nun gehen,jedenfals tut es das bei mir.....

<script language="JavaScript">
<!--
function go(form) {
var myselecter=form.select1.selectedIndex
window.open(form.select1.options[myselecter].value, target="main");
}
//-->
</script>

<script language="JavaScript">
<!--
document.write('<form name="selecter"><select name="select1" size=1>');
document.write('<option value=none>Wähle eine Kategorie ...');
document.write('<option value=none>-------------------------');
document.write('<option value="blond.html">Blondinen');
document.write('<option value="aethiop.html">Äthiopier');
document.write('<option value="abstrackt.html">Abstrackt');
document.write('<option value="oestr.html">Österreicher');
document.write('<option value="bilder.html">Cartoons');
document.write('<option value="sonst.html">Sonstige');
document.write('</select>');
document.write('<br>');
document.write('<INPUT TYPE="button" VALUE="Go" onclick="go(this.form)">');
document.write('</form>');
//-->
</script>


ciao,
Klaus....
 
Hi!
da wäre doch noch eine frage: ist es möglich NUR den link "Abstrackt" in der ganzen aktuellen seite (_parent) zu öffnen ???
Wie sähe dann das script aus ?
 
Zurück
Oben