Balazs Bezeczky: Bei Formular mit einem Button zwei Aktionen auslösen

Beitrag lesen

hallo Flo,

spontan fällt mir das hier ein, hab's aber nicht ausprobiert:

<script>
function punkte()
{
    if (punktezahl>80)
        location="datei1.htm";
    else if (punktezahl>60 && punktezahl<80)
        location="datei2.htm";
    //usw.
}
<script>
<body>
<form name="testForm" action="/cgi/script.pl" method=get onSubmit="punkte()">
<!--andere Fromularelemente-->
<input type="submit">
</form>

Grüsse,
Balazs