textfeldinhalt als action übergeben
David
- html
Servus,
wie kann ich einem Formular als action, die Datei zuweisen, die in eine textbox manuell eingegeben wurde???
action="document.formular... ???
Grüße
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
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>
Sers,
ja da warst du falsch gelegen. Im Attribute action kann man kein js ausführen.
Jedenfalls noch nicht
Jones
tag
machs doch folgener maßen:
function setzteaction()
{
document.form.action = document.form.txt.value;
}
<INPUT type=text name="txt" onChange="setzteaction()">
tschau
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>