Formular auslesen mit Javascript
Richie
- javascript
Hallo zusammen!
Ich habe ein Formular und möchte den Inhalt mit Hilfe eines JavaScripts weiterbearbeiten und anschließend per E-mail verschicken. Auf meinem PC funktioniert das Ganze schon so wie ich mir das vorstelle. Wenn ich jedoch die HTML-Seite im Intranet einbinde (was ja dem eigentlichen Verwendungszweck entspricht), bekomme ich jedes mal eine JavaScript-Fehlermeldung: "'document.MIPFormular.Produktbereich' ist Null oder kein Objekt"
Für mich sieht das aus als wäre 'document.MIPFormular.Produktbereich' nicht eindeutig definiert. Warum aber funktioniert es dann wenn ich es lokal auf meinem PC ausführe? Was kann ich verändern, damit es auch im Intranet geht?
Vielen Dank für Eure Hilfe im Voraus!
Beste Grüße,
Richie
PS: Hier ist der Code der HTML-Seite TESTFORMULAR.html:
<edit> Ich würde gerne den Quelltext angeben, aber das Forum meckert wegen der Länge des Beitrags! </edit>
<html>
<head> <title>TESTFORMULAR</title> <link href="portal.css" type="text/css" rel="stylesheet">
<script type="text/javascript"> <!-- //var test= document.forms["MIPFormular"]; function swap(){ //if (test.value != 0) window.close(); if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Entertainment
Devices"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Handhelds"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Tablet PCs"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Notebooks"){ MIPFormular.Unterkategorie.options[0].value = "Home"; document.getElementById("u0").firstChild.nodeValue = "Home"; MIPFormular.Unterkategorie.options[1].value = "Professional"; document.getElementById("u1").firstChild.nodeValue = "Professional"; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Thin Clients"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Personal
Computers"){ MIPFormular.Unterkategorie.options[0].value = "Home"; document.getElementById("u0").firstChild.nodeValue = "Home"; MIPFormular.Unterkategorie.options[1].value = "Professional"; document.getElementById("u1").firstChild.nodeValue = "Professional"; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Workstations"){ MIPFormular.Unterkategorie.options[0].value = "Mobile"; document.getElementById("u0").firstChild.nodeValue = "Mobile"; MIPFormular.Unterkategorie.options[1].value = "Stationary"; document.getElementById("u1").firstChild.nodeValue = "Stationary"; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Broadband
Solutions"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Servers"){ MIPFormular.Unterkategorie.options[0].value = "Intel based Servers"; document.getElementById("u0").firstChild.nodeValue = "Intel based Servers"; MIPFormular.Unterkategorie.options[1].value = "BS2000/OSD Servers"; document.getElementById("u1").firstChild.nodeValue = "BS2000/OSD Servers"; MIPFormular.Unterkategorie.options[2].value = "UNIX Servers"; document.getElementById("u2").firstChild.nodeValue = "UNIX Servers"; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Storage"){ MIPFormular.Unterkategorie.options[0].value = "Disk"; document.getElementById("u0").firstChild.nodeValue = "Disk"; MIPFormular.Unterkategorie.options[1].value = "Tape"; document.getElementById("u1").firstChild.nodeValue = "Tape"; MIPFormular.Unterkategorie.options[2].value = "Optical"; document.getElementById("u2").firstChild.nodeValue = "Optical"; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value == "Software"){ MIPFormular.Unterkategorie.options[0].value = ""; document.getElementById("u0").firstChild.nodeValue = "Unterkategorie"; MIPFormular.Unterkategorie.options[1].value = ""; document.getElementById("u1").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[2].value = ""; document.getElementById("u2").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[3].value = ""; document.getElementById("u3").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[4].value = ""; document.getElementById("u4").firstChild.nodeValue = "."; MIPFormular.Unterkategorie.options[5].value = ""; document.getElementById("u5").firstChild.nodeValue = "."; } if (MIPFormular.Produktbereich.options[MIPFormular.Produktbereich.selectedIndex].value ==
"Displays/Accesories"){ MIPFormular.Unterkategorie.options[0].value = "Displays"; document.getElementById("u0").firstChild.nodeValue = "Displays"; MIPFormular.Unterkategorie.options[1].value = "Input Devices"; document.getElementById("u1").firstChild.nodeValue = "Input Devices"; MIPFormular.Unterkategorie.options[2].value = "Home Accesories"; document.getElementById("u2").firstChild.nodeValue = "Home Accesories"; MIPFormular.Unterkategorie.options[3].value = "Mainboards"; document.getElementById("u3").firstChild.nodeValue = "Mainboards"; MIPFormular.Unterkategorie.options[4].value = "Printers"; document.getElementById("u4").firstChild.nodeValue = "Printers"; MIPFormular.Unterkategorie.options[5].value = "Scanners"; document.getElementById("u5").firstChild.nodeValue = "Scanners"; } MIPFormular.Unterkategorie.selectedIndex = 0; } //--> </script>
</head>
<body>
<form name="MIPFormular" action="mailto:email@somewhere.com" method="post" language="javascript" id="MIPFormular"
onsubmit="return sendFormular(this,'email@somewhere.com',700,300);">
<input type="hidden" name="FormName" value="MIP-Formular" /> <table border="0" cellpadding="5" cellspacing="0"> <tr> <td align="left" width="300">Name:</td> <td> <input name="Name" type="text" size="40" maxlength="75" /></td> </tr> <tr> <td align="left" width="300">E-mail:</td> <td> <input type="text" size="40" name="Mail"></td> </tr> <tr> <td align="left" width="300">Telefon:</td> <td> <input type="text" size="40" name="Phone"></td> </tr> <tr> <td align="left" width="300">Das Produkt stammt aus folgendem Bereich:</td> <td><select name="Produktbereich" size="1" onchange="swap();"> <option value="Entertainment Devices">Entertainment Devices</option> <option value="Handhelds">Handhelds</option> <option value="Tablet PCs">Tablet PCs</option> <option value="Notebooks">Notebooks</option> <option value="Thin Clients">Thin Clients</option> <option value="Personal Computers">Personal Computers</option> <option value="Workstations">Workstations</option> <option value="Broadband Solutions">Broadband Solutions</option> <option value="Servers">Servers</option> <option value="Storage">Storage</option> <option value="Software">Software</option> <option value="Displays/Accesories">Displays/Accesories</option> </select></td> </tr> <tr> <td>
</td> </tr> <tr> <td align="left" width="300">Das Produkt lässt sich in folgende Unterkategorie einordnen:</td> <td><select name="Unterkategorie" size="1"> <option value id="u0">Unterkategorie</option> <option value id="u1">.</option> <option value id="u2">.</option> <option value id="u3">.</option> <option value id="u4">.</option> <option value id="u5">.</option> <option value id="u6">.</option> <option value id="u7">.</option> </select></td> </tr> </table>
<table border="0" cellpadding="5" cellspacing="0"> <tr> <td align="left" width="300">Folgende Features gehören dazu:</td> <td width="120"> <input type="checkbox" name="Feature" checked="checked" value="0" />USB<br> <input type="checkbox" name="Feature" checked="checked" value="1" />Firewire<br> <input type="checkbox" name="Feature" checked="checked" value="2" />Grafikkarte<br> <input type="checkbox" name="Feature" checked="checked" value="3" />usw1<br> <input type="checkbox" name="Feature" checked="checked" value="4" />usw2<br> </td> <td width="120"> <input type="checkbox" name="Feature" checked="checked" value="5" />usw3<br> <input type="checkbox" name="Feature" checked="checked" value="6" />usw4<br> <input type="checkbox" name="Feature" checked="checked" value="7" />usw5<br> <input type="checkbox" name="Feature" checked="checked" value="8" />usw6<br> <input type="checkbox" name="Feature" checked="checked" value="9" />usw7<br> </td> <td width="120"> <input type="checkbox" name="Feature" checked="checked" value="10" />usw8<br> <input type="checkbox" name="Feature" checked="checked" value="11" />usw9<br> <input type="checkbox" name="Feature" checked="checked" value="12" />usw10<br> <input type="checkbox" name="Feature" checked="checked" value="13" />usw11<br> <input type="checkbox" name="Feature" checked="checked" value="14" />usw12<br> </td> </tr> </table>
<table border="0" cellpadding="5" cellspacing="0"> <tr> <td align="left" width="300">Frage 1?</td> <td><textarea name="frage1" rows="5" cols="40"></textarea></td> </tr> <tr> <td align="left" width="300">Frage 2?</td> <td><textarea name="frage2" rows="5" cols="40"></textarea></td> </tr> <tr> <td align="left" width="300">Frage 3?</td> <td><textarea name="frage3" rows="5" cols="40"></textarea></td> </tr> <tr> <td align="left" width="300">Frage 4?</td> <td><textarea name="frage4" rows="5" cols="40"></textarea></td> </tr> <tr> <td align="left"> <tr> <td align="left" width="300">Bemerkungen:</td> <td><textarea name="Meinung" rows="15" cols="40"></textarea></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td colspan="2" align="center"> <input type="submit" value="Submit"> <input type="reset" value="Reset"></td> </tr> </table>
</form>
<script type="text/javascript"> <!-- function sendFormular(docForm,email,weite,hoehe) { if (docForm.Name.value.length == 0){ alert ("Sie haben Ihren Namen nicht angegeben!"); docForm.Name.focus(); return false; } if (docForm.Phone.value.length == 0){ alert ("Sie haben keine Telefonnummer eingegeben!"); docForm.Phone.focus(); return false; }
// if (navigator.appName != "Microsoft Internet Explorer") return true;
var wert = new Array(); wert[0] = docForm.Name.value; wert[1] = docForm.Mail.value; wert[2] = docForm.Phone.value; wert[3] = docForm.Produktbereich.options[docForm.Produktbereich.selectedIndex].value; wert[4] = docForm.Unterkategorie.options[docForm.Unterkategorie.selectedIndex].value; wert[5] = ""; //leer, Zuweisung später in der for-Schleife wert[6] = docForm.Meinung.value;
//Ein Array für die Auswertung des Formulars wird erstellt. var t = new Array();
t[0] = "Name: " + docForm.Name.value; t[1] = "E-mail: " + docForm.Mail.value; t[2] = "Telefon: " + docForm.Phone.value; t[3] = "Produktbereich: " + docForm.Produktbereich.options[docForm.Produktbereich.selectedIndex].value; t[4] = "Unterkategorie: " + docForm.Unterkategorie.options[docForm.Unterkategorie.selectedIndex].value;
//Hier werden die Checkboxes für die Features ausgelesen und in den Array geschrieben. for(var i=0; i<(docForm.Feature.length); i++){ if ((docForm.Feature[i].checked == true)&&(i<(docForm.Feature.length))){ wert[5] = wert[5] + docForm.Feature[i].value + ", "; } } t[5] = "Features: " + wert[5];
t[6] = "Bemerkungen: " + docForm.Meinung.value;
var x = (screen.width - weite - 10) / 2; var y = (screen.height - hoehe - 32) / 2; var fenster = "width=" + weite + ",height=" + hoehe + ",left=" + x + ",top=" + y + ",scrollbars=yes"; var Formular = window.open("","PopUp",fenster); Formular.focus(); Formular.document.open(); Formular.document.write("<html><head><title>Formular</title></head>"); Formular.document.write("<body style="font-family:Verdana; font-size:12px;"); Formular.document.write(" color:black; background:white;">"); var m = ""; for (var i = 0; i <= 6; i++) /* Formularfelder 0 - 6 */ { var z = ""; var cr = 0; for (var y = 0; y < Number(t[i].length); y++) { switch(t[i].charCodeAt(y)) { case 13: z = z + "¦"; cr = 1; break; case 10: if (!cr) z = z + "¦"; break; case 32: z = z + " "; break; case 34: z = z + """; break; case 37: z = z + "%"; break; case 38: z = z + "&"; break; case 60: z = z + "<"; break; case 62: z = z + ">"; break; case 63: z = z + "?"; break; case 64: z = z + "@"; break; case 196: z = z + "Ä"; break; case 214: z = z + "Ö"; break; case 220: z = z + "Ü"; break; case 223: z = z + "ß"; break; case 228: z = z + "ä"; break; case 246: z = z + "ö"; break; case 252: z = z + "ü"; break; case 8364: z = z + "EUR"; break; default: if (t[i].charCodeAt(y) > 32 && t[i].charCodeAt(y) < 127) z = z + t[i].charAt(y); else z = z + "¿"; break; } } t[i] = z; z = ""; for (y = 0; y < Number(t[i].length); y++) { if (t[i].charAt(y) == "¦") z = z + "<br/>"; else z = z + t[i].charAt(y); } Formular.document.write(z + "<br/>"); z = ""; for (y = 0; y < Number(t[i].length); y++) { if (t[i].charAt(y) == "¦") z = z + "%0D%0A"; else z = z + t[i].charAt(y); } //if (i == 1) Formular.document.write("<a href="mailto:" + wert[1] +"">" + wert[1] + "</a>"); t[i] = z; if (i >= 0) m = m + t[i] + "%0D%0A"; if (i <= 6) Formular.document.write("<br/>"); m = m + "%0D%0A";
} //START Auswertung Formular.document.write("<br/><b>Aufgrund Ihrer Angaben zu einem Produkt aus dem Bereich " + wert[3] + ", " + wert[4] + "
müssen folgende Faktoren berücksichtigt werden:</b>\n");
//ENDE Auswertung Formular.document.write("<br/><b>Sie können dieses Formular vor dem Absenden ausdrucken. Sollten Sie weitere Fragen haben,
bitte wenden Sie sich an: <a href="mailto:jemand@email.com">jemand@email.com</a></b>");
/Formular.document.write("<br/><b>Test: </b>" + docForm.Unterkategorie.options[0].value); Formular.document.write("<br/><b>Test: </b>" + docForm.Unterkategorie.options[1].value); Formular.document.write("<br/><b>Test: </b>" + docForm.Unterkategorie.options[2].value); Formular.document.write("<br/><b>Test: </b>" + docForm.Unterkategorie.options[3].value);/
Formular.document.write("<br/><br/><a href="mailto:" + email); Formular.document.write("?subject=BETREFF" + "&body=" + m + """); Formular.document.write(" onclick="window.setTimeout('self.close()',100)""); Formular.document.write(">eMail versenden</a> "); Formular.document.write("<a href=javascript:self.print();>Drucken</a>"); Formular.document.writeln("</body></html>"); Formular.document.close(); return false; } //--> </script>
</body>
</html>
Ich habe nun den Quelltext in 2 (!!) Posts aufteilen müssen...
Bitte beachtet, dass der erste Teil des Quelltextes das Posting um 11:58 Uhr ist. Den zweiten Teil findet Ihr im Beitrag von 11:59 Uhr.
Fragt mich nicht, warum das in umgekehrter Reihenfolge sortiert ist.
Viele Grüße,
Richie
hi,
Ich habe nun den Quelltext in 2 (!!) Posts aufteilen müssen...
</faq/#Q-07c>, beginn zweiter absatz:
"Wenn Sie Quellcode im Forum posten, solltes Sie jedoch nur den für das Problem relevanten Teil in die Nachricht kopieren"
das steht nicht zum spass da!
den code auf die für das problem relevanten code-teile zu reduzieren ist _deine_ aufgabe - du willst diese jedoch jetzt auf uns übertragen, in dem du hier einfach deinen kompletten quelltext ablädst.
ich habe keine lust, mich da durchzuwühlen, und die meisten anderen wahrscheinlich auch nicht.
gruss,
wahsaga
den code auf die für das problem relevanten code-teile zu reduzieren ist _deine_ aufgabe - du willst diese jedoch jetzt auf uns übertragen, in dem du hier einfach deinen kompletten quelltext ablädst.
Gut, vielen Dank für die Hilfe.
Leider weiß ich nicht, welcher Teil des Codes relevant ist.
Wüsste ich es, würde ich den Fehler selbst schon haben.
In Zukunft also kürzere Quelltexte.
Gruß,
Richie
Hi,
das Script kenn' ich doch... daher kann ich hierin schonmal Fehler ausschließen ;-)
Es würde wohl auch funktionieren, wenn Du oder Dein Editor nicht ein paar Zeilenumbrüche inmitten von Stringbereichen gesetzt hättest. Zwischen den "" darf kein Umbruch erfolgen, was Dir aber auch die Javasciptkonsole eines vernünftigen Browsers gesagt hätte.
Außerdem entferne 'language="javascript"' aus dem form-Tag - das hat hier wirklich nichts verloren.
Schließlich würde ich noch die SendFormular-Funktion als erstes im Head angeben, dann sollte es klappen.
Und laß' Dich nicht von den Unkenrufen hier einschüchtern; gerade im Intr_a_net hat mein Script beste Chancen zu funktionieren, wenn Du sicherstellen kannst, daß alle Teilnehmer Javascript aktiviert haben (z.B. im IE das Intranet als "vertrauenswürdig" eingestuft ist) und die im Einsatz befindlichen Browser/eMail-clients testen kannst. Es hat hier sogar den Vorteil, daß kein Server installiert sein muß bzw. kein Externer Server im Netz in Anspruch genommen werden muß.
Gruß
Ingo
freundliche Grüße
Ingo
Hi,
das Script kenn' ich doch... daher kann ich hierin schonmal Fehler ausschließen ;-)
Hallo Ingo!
Sehr richtig! ;-) Ich bin dabei das Script so umzuschreiben, dass per E-mail der vorgefertigte Text verschickt werden kann. Außerdem (und das ist jetzt mein erfinderischer Beitrag ;-)) sollen durch bestimmte Prüfsummen, die aus dem Formular ausgelesen werden, dann entsprechend bestimmte Baukasten-Sätze in den E-mail Text eingefügt werden.
Es würde wohl auch funktionieren, wenn Du oder Dein Editor nicht ein paar Zeilenumbrüche inmitten von Stringbereichen gesetzt hättest. Zwischen den "" darf kein Umbruch erfolgen, was Dir aber auch die Javasciptkonsole eines vernünftigen Browsers gesagt hätte.
Außerdem entferne 'language="javascript"' aus dem form-Tag - das hat hier wirklich nichts verloren.
Schließlich würde ich noch die SendFormular-Funktion als erstes im Head angeben, dann sollte es klappen.
Werde ich gleich überprüfen. Vielen Dank für die Tips!
Und laß' Dich nicht von den Unkenrufen hier einschüchtern; gerade im Intr_a_net hat mein Script beste Chancen zu funktionieren, wenn Du sicherstellen kannst, daß alle Teilnehmer Javascript aktiviert haben [...]
EBEN!
In unserem Intranet gibt es nur eine Browserversion und eine Sicherheitseinstellung, da sämtliche Intranet-PCs zentral eingerichtet und gepflegt werden. Deswegen hat mir diese Idee auch so gut gefallen.
(z.B. im IE das Intranet als "vertrauenswürdig" eingestuft ist) und die im Einsatz befindlichen Browser/eMail-clients testen kannst. Es hat hier sogar den Vorteil, daß kein Server installiert sein muß bzw. kein Externer Server im Netz in Anspruch genommen werden muß.
Auch richtig. Mit PHP wäre es vielleicht einfacher gegangen, da ich aber leider nicht den dafür notwendigen Server zur Verfügung habe, muss ich so verbleiben.
Gruß
Ingo
Vielen Dank und freundliche Grüße zurück,
Richie
Huhu Richie
das war ja ein nettes Solo, vier Postings in nur 8 Minuten ...
<edit> Ich würde gerne den Quelltext angeben, aber das Forum meckert wegen der Länge des Beitrags! </edit>
Nicht nur das Forum, sondern vor allem die Leser des selbigen.
Wenn es Dir nicht möglich ist das Problem einzugrenzen und den notwendigen Code auf ein erträgliches Maß zu reduzieren solltest Du
a) Deine "Fehler-Such-Strategie" verbessern
b) das Beispiel online verfügbar machen und nur den Link posten
"Mailto"-Formulare sind nur eine theoretische Lösungsmöglichkeit, in der Praxis sind sie nicht sinnvoll einsetzbar.
Da Du ja eine JavaScript Fehlermeldung erhältst, wäre das Dein erster Ansatzpunkt.
Benutze einen geeigneten Browser zur Fehlersuche, also z.B. Opera oder Mozilla. Beide bieten eine Javascript-Konsole die bei der Fehlersuche sehr hilfreich ist.
Ansonsten wage ich die pessimistische Prognose, dass die Zahl der Forumsleser, welche geneigt sind sich durch den durchaus als umfangreich zu bezeichnenden Quälcode zu wühlen, als sehr gering einzuschätzen ist ;-)
Viele Grüße
lulu
Nicht nur das Forum, sondern vor allem die Leser des selbigen.
Sorry, das war nicht meine Absicht.
Wenn es Dir nicht möglich ist das Problem einzugrenzen und den notwendigen Code auf ein erträgliches Maß zu reduzieren solltest Du
Genau das ist der Fall... Wüsste ich, in welchem Teil ich den Fehler suchen muss, müsste ich hier nicht mehr um Hilfe bitten. ;-)
Ich habe den Quelltext komplett angegeben, damit man die HTML-Datei auch ausführen kann. Der Quelltext ist in diesem Fall nicht zum durchzulesen gedacht, sondern zum einfachen Ausprobieren.
a) Deine "Fehler-Such-Strategie" verbessern
b) das Beispiel online verfügbar machen und nur den Link posten
zu a) werde ich versuchen
zu b) ich bin leider nicht dazu bemächtigt Zugriff aufs Intranet zu erteilen
"Mailto"-Formulare sind nur eine theoretische Lösungsmöglichkeit, in der Praxis sind sie nicht sinnvoll einsetzbar.
Das ist mir bekannt, ich habe deswegen die Formularweitergabe passend für mich umgeschrieben.
Mein Problem liegt auch weniger im "Mailto"-Formular, sondern bei der Initialisierung des Formularfeldes 'Produktbereich', der vermutlich aus mir unbekannten Gründen nicht stattfindet.
Da Du ja eine JavaScript Fehlermeldung erhältst, wäre das Dein erster Ansatzpunkt.
Benutze einen geeigneten Browser zur Fehlersuche, also z.B. Opera oder Mozilla. Beide bieten eine Javascript-Konsole die bei der Fehlersuche sehr hilfreich ist.
Vielen Dank dafür.
Hilfreicher Tipp.
Ansonsten wage ich die pessimistische Prognose, dass die Zahl der Forumsleser, welche geneigt sind sich durch den durchaus als umfangreich zu bezeichnenden Quälcode zu wühlen, als sehr gering einzuschätzen ist ;-)
Ja, das habe ich zu spüren bekommen. Es war auch nicht meine Absicht die Forumsleser mit Quelltext voll zu müllen.
Viele Grüße
lulu
Danke nochmal und viele Grüße zurück!
Richie