Hallo zusammen,
bei meinem kleinen script scheint für mich als Anfänger zwar der logische Zusammenhang gegeben zu sein, allerdings funktioniert die Kostenermittlung nicht, obwohl keine Fehlermeldung vorliegt.
Problem scheint im Abruf / Einbindung der Java Funktion zu liegen.
Wer kann mir bitte das script ggf. funktionstüchtig korrigieren ?
Besten Dank für die Hilfe.
Gruß von Optimist.
___________________________________________________________________________
SCRIPT: :?:
bei meinem kleinen script scheint für mich als Anfänger zwar der logische Zusammenhang gegeben zu sein, allerdings funktioniert die Kostenermittlung nicht, obwohl keine Fehlermeldung vorliegt.
Problem scheint im Abruf / Einbindung der Java Funktion zu liegen.
Wer kann mir bitte das script ggf. funktionstüchtig korrigieren ?
Besten Dank für die Hilfe.
Gruß von Optimist.
___________________________________________________________________________
SCRIPT: :?:
Code:
<html>
<head>
<title>Ebay Gebühren</title>
<script language="JavaScript">
function Kosten(Zahl)
{
var Angebotsgebühr = this.form.Startpreis.value;
var Provision = this.form.Gebot.value;
var Gesamtkosten = 0;
var Untertitel = 0;
var Fettschrift = 0;
var Highlightposition = 0;
var Suchtopposition = 0;
var Startseitentopposition = 0;
var Startzeitplanung = 0;
var Sofortkauf = 0;
if (this.form.Startpreis.value < 2) (Angebotsgebühr=0,25);
if (this.form.Startpreis.value >= 2) (Angebotsgebühr=0,45);
if (this.form.Startpreis.value >= 10) (Angebotsgebühr=0,80);
if (this.form.Startpreis.value >= 25) (Angebotsgebühr=1,60);
if (this.form.Startpreis.value >= 100) (Angebotsgebühr=3,20);
if (this.form.Startpreis.value >= 250) (Angebotsgebühr=4,80);
if(this.form.Gebot.value <= 50) (Provision=this.form.Gebot.value*1.05);
if(this.form.Gebot.value > 50) (Provision=(this.form.Gebot.value-50,01)*1.04+2,50);
if(this.form.Gebot.value > 500) (Provision=(this.form.Gebot.value-500,01)*1.02+20,50);
if (this.form.Untertitel.value = "ON") (Untertitel = 0.50);
if (this.form.Fettschrift.value = "ON") (Fettschrift = 0.85);
if (this.form.Highlightposition.value = "ON") (Highlightposition = 1.50);
if (this.form.Suchtopposition.value = "ON") (Suchtopposition = 12.95);
if (this.form.Startseitentopposition.value = "ON") (Startseitentopposition = 79,75);
if (this.form.Startzeitplanung.value = "ON") (Startzeitplanung = 0.10);
if (this.form.Sofortkauf.value = "ON")
{
if (this.form.Sofortkaufpreis.value < 10) (Sofortkauf = 0.10);
if (this.form.Sofortkaufpreis.value >= 10) (Sofortkauf = 0.25);
if (this.form.Sofortkaufpreis.value >= 100) (Sofortkauf = 0.5);
}
Gesamtkosten = Angebotsgebühr + Provision + Untertitel + Fettschrift + Highlightposition + Suchtopposition + Startseitentopposition + Startzeitplanung + Sofortkauf;
this.form.Gebühren.value = Gesamtkosten;
document.writeln('this.form.Gebühren.value');
}
</script>
</head>
<body>
<form name=FORMULAR>
<p align="left">
<input type="checkbox" name="Untertitel" value="OFF">Untertitel
<input type="checkbox" name="Fettschrift" value="OFF">Titel Fettschrift
<input type="checkbox" name="Highlightposition" value="OFF">Position Highlight
<input type="checkbox" name="Suchtopposition" value="OFF">Top Position Suche
<input type="checkbox" name="Startseitentopposition" value="OFF">Top Position Startseite
<input type="checkbox" name="Startzeitplanung" value="OFF">Starseite planen
<input type="checkbox" name="Sofortkauf" value="OFF">Sofortkauf
</p>
Startpreis: <input style="width:60px" maxlength="8" name="Startpreis">
Sofortkauf: <input style="width:60px" maxlength="8" name="Sofortkaufpreis">
Gebot: <input style="width:60px" maxlength="8" name="Gebot">
<input style="height:30px;width:240px" type="button" name="Zahl" value="Berechnen" onClick="javasript:'Kosten()'">
Gebühren: <input style="width:60px"name="Gebühren" readonly>
</form>
</body>
</html>