Mssmar: Option-Felder

Beitrag lesen

Ich fülle ein Dropdown-Menu dynamisch mit Inhalt.

Am Ende der Funktion, rufe ich eine submit() Funktion auf, die diese Formular rausschickt.

Mein Problem ist, dass durch den Aufruf von: formObj.submit();
am Edne, die Dropdowmenus wieder geleert werden und damit erreiche ich nicht dass die Oprtion-Felder gefüllt werden.

Wüsste Jemand evtl. woran es legen könnte?

Vielen Dank und Gruß
Messmar

  
  
function changeGID(selObj) {  
var formObj = selObj.form;  
  
akt_date = new Array();  
  
akt_date["IIS"] = new Array;  
akt_date["IIS"][0] = "";  
akt_date["IIS"][1] = "26 April 2006";  
akt_date["IIS"][2] = "27 April 2006";  
akt_date["IIS"][3] = "28 April 2006";  
  
akt_date["OIM"] = new Array;  
akt_date["OIM"][0] = "";  
akt_date["OIM"][1] = "oim_2006-12-02";  
  
akt_venue = new Array();  
  
akt_venue["IIS"] = new Array;  
akt_venue["IIS"][0] = "";  
akt_venue["IIS"][1] = "Alverton Manor";  
akt_venue["IIS"][2] = "Crowne Plaza";  
akt_venue["IIS"][3] = "Woodbury Park";  
  
akt_venue["OIM"] = new Array;  
akt_venue["OIM"][0] = "";  
akt_venue["OIM"][1] = "oimVanue_01";  
  
  
akt_location = new Array();  
  
akt_location["IIS"] = new Array;  
akt_location["IIS"][0] = "";  
akt_location["IIS"][1] = "Truro";  
akt_location["IIS"][2] = "Glasgow";  
  
  
akt_location["OIM"] = new Array;  
akt_location["OIM"][0] = "";  
akt_location["OIM"][1] = "oimLocation_01";  
  
 choosenSystem = document.form.gid.options[document.form.gid.options.selectedIndex].text;  
 rebuild_menu();  
  
 for(i=0; i<akt_date[choosenSystem].length; i++) {  
  optionen = new Option(akt_date[choosenSystem][i]);  
  document.form.date.options[i] = optionen;  
  document.form.date.options[i].value = akt_date[choosenSystem][i];  
  
 }  
  
 for(i=0; i<akt_venue[choosenSystem].length; i++) {  
  optionen = new Option(akt_venue[choosenSystem][i]);  
  document.form.venue.options[i] = optionen;  
  document.form.venue.options[i].value = akt_venue[choosenSystem][i];  
 }  
  
 for(i=0; i<akt_location[choosenSystem].length; i++) {  
  optionen = new Option(akt_location[choosenSystem][i]);  
  document.form.location.options[i] = optionen;  
  document.form.location.options[i].value = akt_location[choosenSystem][i];  
 }  
  
formObj.submit();  
}