Sprungmenue mittels Formular

lordofscotland

Erfahrenes Mitglied
Hi @ all,

hab ein Problem mit einem Sprungmenue das mit einem Auswahlmenue functionieren soll.

Das ganze läuft in einem Iframe ab so das ich mehrere Seitn in einer laden kann.

Nun mein Problem, das ertse Asuwahlmenue funzt ohne Probleme

Code:
-> 
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[0].location;
 else {
   parent.frames[0].location.href = x;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
 }
} 
<-

Das andere ausahlmenue soll mit dem selben Code Seiten in einem Iframe wechseln der im Iframe aufgerufen wird

Code:
->
function Go2(x) {
 if(x == "nothing") {
   document.forms[1].reset();
   document.forms[1].elements[1].blur();
   return;
 }
 else if(x == "end")
   top.location.href = parent.frames[1].location;
 else {
   parent.frames[1].location.href = x;
   document.forms[1].reset();
   document.forms[1].elements[1].blur();
 }
}
<-

Was ist falsch an dem zweiten Code????

Ich dank euch im Voraus schon wie verrückt

lord
 
Hallo,

mal schauen ob ich dich richtig verstanden habe:
Code:
+--------------------------------------------+
|  Seite mit dem Menu z.B: Index.htm         |
|                                            |
|  +----------+                              |
|  | Dropdown |                              |
|  +----------+                              |
|                                            |
|  +-iframe1------------------------------+  |
|  | Seite im Iframe mit weiterem Iframe  |  |
|  |                                      |  |
|  | +-iframe2-------------------------+  |  | 
|  | |                                 |  |  |
|  | |                                 |  |  |
|  | |                                 |  |  |
|  | |                                 |  |  |
|  | |                                 |  |  |
|  | +---------------------------------+  |  |
|  +--------------------------------------+  |
+--------------------------------------------+
Du möchtest jetzt im Dropdow aud Index.html einen Link auswählen , der dann im "iframe 2" geöffnet wird... sehe ich das richtig?
Ich hab dein Menü geteste, allerdings funktionierte es nicht richtig bei mir... hab dann follgendes daus gebaut:
PHP:
function Go2(x)
{
 var link = x.jump.selectedIndex;

 if(x.jump.options[link].value == "nothing") {
   alert("your code goes here");
   return;
 }
 else if(x.jump.options[link].value == "end") {
   alert("your code goes here");
   return;
 }
 else {
   parent.iframe1.iframe2.location.href = x.jump.options[link].value;
 }
}

Ich hoffe mal du kommst damit etwas weiter - es sei denn ich hab dich total missverstanden :)... Ich häng dir noch meine drei Datein an...

Wenn ich absolut falsch liege, dann häng mal dein Datein an, vielleicht ist der Fehler ja in dem Formular...


ciao
 

Anhänge

  • try.zip
    829 Bytes · Aufrufe: 19
Zuletzt bearbeitet:
Zurück