David: textfeldinhalt als action übergeben

Servus,

wie kann ich einem Formular als action, die Datei zuweisen, die in eine textbox manuell eingegeben wurde???

action="document.formular... ???

Grüße

  1. Sersn,

    war schon beinahe richtig! Hier hab ich dir einen kleine Test zusammengeschustert!

    <!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    </head>

    <body>
    <form action="test.php">
    <input type="text" name="actionFeld" value="muaahhh.php">
    <a href="javascript:alert(document.forms[0].action);document.forms[0].action=document.forms[0].actionFeld.value;alert(document.forms[0].action)">Make it so!</a>
    </form>
    </body>
    </html>

    Servus,

    wie kann ich einem Formular als action, die Datei zuweisen, die in eine textbox manuell eingegeben wurde???

    action="document.formular... ???

    Grüße

    1. Ich dachte eher an was in der Art, aber iregnwo liegt der Fehler...

      <html>
      <head></head>
      <body>
      <form name="formular" action="document.formular.password.value" method="post">
      <table width=100%>
      <tr>Bitte geben Sie hier das Passwort ein:</tr>
      <tr><input name="password" type="password" size="10" maxlength="10"></tr>
      <tr></tr>
      <tr><input type="submit" value="Login"></tr>
      </table>
      </form>
      </body>
      </html>

      1. Sers,

        ja da warst du falsch gelegen. Im Attribute action kann man kein js ausführen.
        Jedenfalls noch nicht

        Jones

  2. tag

    machs doch folgener maßen:

    function setzteaction()
     {
          document.form.action = document.form.txt.value;
     }

    <INPUT type=text name="txt" onChange="setzteaction()">

    tschau

  3. Ich dachte eher an was in der Art, aber iregnwo liegt der Fehler...

    <html>
    <head></head>
    <body>
    <form name="formular" action="document.formular.password.value" method="post">
    <table width=100%>
    <tr>Bitte geben Sie hier das Passwort ein:</tr>
    <tr><input name="password" type="password" size="10" maxlength="10"></tr>
    <tr></tr>
    <tr><input type="submit" value="Login"></tr>
    </table>
    </form>
    </body>
    </html>