![]() |
SELFHTML Forumsarchiv |
|
|
Die folgende Nachricht zum Thema stammt von: oliver berndt, 30. 11. 2003, 12:30
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
Die folgende Nachricht zum Thema stammt von: sschumann, 30. 11. 2003, 13:18
»» 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.
Die folgende Nachricht zum Thema stammt von: oliver berndt, 30. 11. 2003, 14:30
Thx @ sschumann!Aber klappt leider nich weiß noch jemand rat oder ne elegantere lösung????Thx MfG oliver
Die folgende Nachricht zum Thema stammt von: sschumann, 30. 11. 2003, 22:27
»» 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.
© 1998-2006
Impressum, Software: Classic Forum