M
Marco
Hi,
I want to automatically an html form when the user selects one item from a
drop down menu. It doesn't work as expected. I get the error message:
this.submit is not a function
and the form is not automatically submitted. What's wrong? Here's my code:
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="content-type" content="application/xhtml+xml;charset=UTF-8" />
<title>
PageTitle
</title>
</head>
<body>
<form action="" method="post">
<p>
<select name="foo" onchange="this.submit();">
<option value="1">First</option>
<option value="2">Second</option>
</select>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
</body>
</html>
Regards
Marco
I want to automatically an html form when the user selects one item from a
drop down menu. It doesn't work as expected. I get the error message:
this.submit is not a function
and the form is not automatically submitted. What's wrong? Here's my code:
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="content-type" content="application/xhtml+xml;charset=UTF-8" />
<title>
PageTitle
</title>
</head>
<body>
<form action="" method="post">
<p>
<select name="foo" onchange="this.submit();">
<option value="1">First</option>
<option value="2">Second</option>
</select>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
</body>
</html>
Regards
Marco