HTMLWorld - HTML, CSS, JavaScript, PHP, Java, Flash und vieles mehrHTMLWorld:   Home | Impressum
 

 
 

Anzeige 
 
HTMLWorld » Forum

Thema anzeigen - javascript oder hilfe gesucht

 FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   BenutzergruppenBenutzergruppen   RegistrierenRegistrieren 
 ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin 

javascript oder hilfe gesucht

 

Neues Thema eröffnen   Neue Antwort erstellen    HTMLWorld Foren-Übersicht
   JavaScript
Vorheriges Thema:
Nächstes Thema:  
Autor Nachricht
reinhard3



Anmeldungsdatum: 17.03.2005
Beiträge: 1

BeitragVerfasst am: 17.03.2005 19:09:51    Titel: javascript oder hilfe gesucht Antworten mit Zitat

Soll für einen Kunden eine CD erstellen - Vorgänger hatte ein kleines Bestellsystem mit Javascript programmiert. hab aber null ahnung von javascript !
Auf der "alten" CD funktioniert es, bei mir allerdings nicht mehr.
Hier das Problem, was ich bislang festgestellt habe:
- index.htm ist ein frameset -> weiterleitung auch ein frameset, dann auswahl eines produktes (mit 2 hinterlegten preisen)
- dann weiterleitung auf ein formular, in dem adresse und mitgliedschaft abgefragt wird
- dann weiterleitung der vorher eingegebenen daten (also produkt und aresse etc. an druckformular)

! ist eigenlich nicht kompliziert, aber ich kann es in die neuen seiten nicht einbinden - habe keine framesets, sonder einen iframe, in dem die produkte aufgeführt sind und dann das bestellformular aufgerufen werden soll - ist kein shop-system !
anzahl der produkte überschaubar: ca. 30

falls mir jemand dabei helfen kann - bitte im forum melden - oder direkt per mail:
info@reinhard-lange.de

vielen dank !

gruss reinhard

hier die details:

- vorgänger hat alles mit framesets (start und content s. tools.htm) gemacht - habe aber jetzt iframe=ecd !

- aufruf der produkte erfolgt über artikel-meta.htm
- auswahl des einzelnen produktes über link/button

(alte version:
<a href="javascript:top.tools.cacheOrder('&lt;b&gt;KfE mit St&uuml;ckliste&lt;/b&gt; f&uuml;r die Schnittstelle ZVEHNORM/ELDANORM 2000','279,- EUR','389,- EUR');" onMouseOver="window.status='bestellen';return true;" onMouseOut="window.status='';return true;">
<img src="../image/icons/i-order.gif" alt="Weiter zur Bestellung." border="0" /></a>
... dann wird das formular erfassen-form.htm aufgerufen

- in erfassen-form.htm wird der produkttext und die 2 bzw. 4 preise eingetragen
- ausserdem folgt in erfassen-form.htm die aufnahme der adresse mit einigen prüfungen (müssen als cookie gespeichert werden)
- nach prüfung der formularinhalte wird die seite order.htm geladen und die vorher gemachten angaben (produkt, preise und adresse) mit bestellung und agb als anhang angezeigt.

- das javascript ist in tools.htm enthalten:
<html>
<head>
<title>ZVEH - Zentralverband der Deutschen Elektro- und Informationstechnischen Handwerke</title>
<link rel="STYLESHEET" type="text/css" href="zveh-ci.css">
<script language="Javascript" src="cookie.js"></script>
<script language="Javascript">
var expdate = new Date ();
FixCookieDate (expdate);
expdate.setTime (expdate.getTime() + (365 * 24 * 3600 * 1000));

var orderinfo, mprice, nprice;
function cacheOrder(tmp1,tmp2,tmp3) {
orderinfo = tmp1; mprice = tmp2; nprice = tmp3;
top.start.content.document.location.href = "erfassen-form.html";
}

var firma = GetCookie("firma"), salutatory = GetCookie("salutatory");
var salutatoryv = GetCookie("salutatoryv"), lastname = GetCookie("lastname");
var firstname = GetCookie("firstname"), address1 = GetCookie("address1");
var address2 = GetCookie("address2"), zipcode = GetCookie("zipcode");
var city = GetCookie("city"), phone = GetCookie("phone");
var fax = GetCookie("fax"), email = GetCookie("email");
var url = GetCookie("url"), mbofguild = GetCookie("mbofguild");
var guild = GetCookie("guild"), association = GetCookie("association");
function cacheAddress() {
firma = top.start.content.document.zvehform.firma.value;
salutatory = top.start.content.document.zvehform.salutatory.options[top.start.content.document.zvehform.salutatory.options.selectedIndex].value;
salutatoryv = top.start.content.document.zvehform.salutatory.options.selectedIndex;
firstname = top.start.content.document.zvehform.firstname.value;
lastname = top.start.content.document.zvehform.lastname.value;
address1 = top.start.content.document.zvehform.address1.value;
address2 = top.start.content.document.zvehform.address2.value;
zipcode = top.start.content.document.zvehform.zipcode.value;
city = top.start.content.document.zvehform.city.value;
phone = top.start.content.document.zvehform.phone.value;
fax = top.start.content.document.zvehform.fax.value;
email = top.start.content.document.zvehform.email.value;
url = top.start.content.document.zvehform.url.value;
if (top.start.content.document.zvehform.mbofguild.checked) {
mbofguild = top.start.content.document.zvehform.mbofguild.value;
} else { mbofguild = ""; }
guild = top.start.content.document.zvehform.guild.value;
association = top.start.content.document.zvehform.association.value;
SetCookie("firma", firma, expdate);
SetCookie("salutatory", salutatory, expdate);
SetCookie("salutatoryv", salutatoryv, expdate);
SetCookie("firstname", firstname, expdate);
SetCookie("lastname", lastname, expdate);
SetCookie("address1", address1, expdate);
SetCookie("address2", address2, expdate);
SetCookie("zipcode", zipcode, expdate);
SetCookie("city", city, expdate);
SetCookie("phone", phone, expdate);
SetCookie("fax", fax, expdate);
SetCookie("email", email, expdate);
SetCookie("url", url, expdate);
SetCookie("mbofguild", mbofguild, expdate);
SetCookie("guild", guild, expdate);
SetCookie("association", association, expdate);
checkForm();
}

function getAddress() {
if (firma) { top.start.content.document.zvehform.firma.value = firma; }
if (salutatoryv) { top.start.content.document.zvehform.salutatory.options[salutatoryv].selected = true; }
if (firstname) { top.start.content.document.zvehform.firstname.value = firstname; }
if (lastname) { top.start.content.document.zvehform.lastname.value = lastname; }
if (address1) { top.start.content.document.zvehform.address1.value = address1; }
if (address2) { top.start.content.document.zvehform.address2.value = address2; }
if (zipcode) { top.start.content.document.zvehform.zipcode.value = zipcode; }
if (city) { top.start.content.document.zvehform.city.value = city; }
if (phone) { top.start.content.document.zvehform.phone.value = phone; }
if (fax) { top.start.content.document.zvehform.fax.value = fax; }
if (email) { top.start.content.document.zvehform.email.value = email; }
if (url) { top.start.content.document.zvehform.url.value = url; }
if (mbofguild == "yes") { top.start.content.document.zvehform.mbofguild.checked = true; }
if (guild) { top.start.content.document.zvehform.guild.value = guild; }
if (association) { top.start.content.document.zvehform.association.value = association; }
}

function checkForm() {
var test = true, arrayOfStrings, i=0, errormsg = new Array(), error_msg;
arrayOfStrings = top.start.content.document.zvehform.firma.value.split(" ");
if (arrayOfStrings.length == (top.start.content.document.zvehform.firma.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihren Firmennamen an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.lastname.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihren Namen an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.address2.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihre Strasse an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.zipcode.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihre PLZ an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.city.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihren Ort an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.phone.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihre Telefonnummer an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.fax.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihre Telefaxnummer an!\n"; }

if (top.start.content.document.zvehform.mbofguild.checked) {
if (arrayOfStrings.length == (top.start.content.document.zvehform.guild.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihre Innung an!\n"; }
if (arrayOfStrings.length == (top.start.content.document.zvehform.association.value.length)+1) {
i++; errormsg[i] = "Geben Sie bitte Ihren Landesverband an!\n"; } }
if (i > 0) {
test = false;
error_msg = "Zentralverband der Deutschen Elektro-\nund Informationstechnischen Handwerke\n\n";
error_msg = error_msg + "Füllen Sie bitte alle Pflichtfelder vollständig aus!\t\t\n\n";
for (i in errormsg) {
error_msg = error_msg + i + ". " + errormsg[i]; }
alert(error_msg); }
if (test) { top.start.content.document.location.href = "order.htm"; }
}

function opmdrucken() {
if (window.print) self.print();
if (document.all && navigator.appVersion.substring(22,23) == 4) {
self.focus();
var OLECMDID_PRINT = 6;
var OLECMDEXECOPT_DONTPROMPTUSER = 2;
var OLECMDEXECOPT_PROMPTUSER = 1;
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd',WebBrowser);
WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER);
WebBrowser1.outerHTML = '';
}
}
</script>
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
Beiträge der letzten Zeit anzeigen:   
Neues Thema eröffnen   Neue Antwort erstellen    HTMLWorld Foren-Übersicht
   JavaScript
Alle Zeiten sind GMT + 1 Stunde
Seite 1 von 1

 
Gehe zu:  
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.