Sebastian: Wie kann ich auf ein mit document.write(

Beitrag lesen

Hallo,

ich habe mit nachfolgendem Sourcecode ein Radio-Button in einer HTML-Datei erzeugt.

document.write("<input type=radio name='appointment' value='" + termin[i] + "'>" + termin[i] + "<br>");

Wenn ich nun mit unten stehendem Befehl auf das Objekt zugreifen will, wird das Objekt nicht gefunden. Warum? Wie kann ich das Problem lösen?

if(document.proposal.appointment[0].checked == true)
{
hashstring += document.proposal.appointment[0].value + ";";
}
else if(document.proposal.appointment[1].checked == true)
{
hashstring += document.proposal.appointment[1].value + ";";
}

Schon im Voraus vielen Dank für Eure Hilfe!

Gruß,
Sebastian