oliver berndt: radiobutton download

Wieso klappt das so nicht???Bitte um hilfe!!!!
---------------------------------------------------------------------
<html>
<script type="text/javascript">
<!--
function wdownload() {
 if(form.sarah.value="1") {
   document.location.href="womans.zip";
   wdownload();
}}// -->
</script>
<head>
<title>Wallpaper</title>
</head>
<body onload="wdownload()">
<form>
<p>
<INPUT NAME="sarah" TYPE="radio"
onClick="setValue(1)" value="">
<input name="Button" type="button" onClick="window.open(form.sarah.value);" value="Download">
</form>
</body>
</html>
------------------------------------------------------------------
Danke!!!!!MfG oliver

  1. function wdownload() {
     if(form.sarah.value="1") {
       document.location.href="womans.zip";
       wdownload();
    }}// -->

    Das wird _schwer_ auf die Systemleistung gehen.

    <form>
    <input name="Button" type="button" onClick="window.open(form.sarah.value);" value="Download">

    Weil es kein Formular "form" gibt. this.form würde hingegen gehen.

    1. Thx @ sschumann!Aber klappt leider nich weiß noch jemand rat oder ne elegantere lösung????Thx MfG oliver

      1. Thx @ sschumann!Aber klappt leider nich weiß noch jemand rat oder ne elegantere lösung????Thx MfG oliver

        Weil alles falsch ist.

        Wieso klappt das so nicht???Bitte um hilfe!!!!

        <html>
        <script type="text/javascript">
        <!--
        function wdownload() {
        if(form.sarah.value="1") {

        ^was soll das?
        Du betreibst hier eine Wertzuweisung.

        document.location.href="womans.zip";
           wdownload();

        Ein bißchen viele Rekursionen, hmmm?

        }}// -->
        </script>
        <head>
        <title>Wallpaper</title>
        </head>
        <body onload="wdownload()">
        <form>
        <p>
        <INPUT NAME="sarah" TYPE="radio"
        onClick="setValue(1)" value="">

        ^Wo ist die Methode?

        <input name="Button" type="button" onClick="window.open(form.sarah.value);" value="Download">

        Und was soll das? Vermutlich sollte nach setValue(), die es leider nicht gibt, der Wert 1 sein. Du willst also ein Fenster mit dem URL "1" öffnen?

        Auch Script-Programmierung ist kein Ratespiel, und Phantasiesyntax wird nicht vom Interpreter transferiert.