Hello... I can't see why this form is not working, when I generate if from a php script through Ajax.
I made a test with the same code written directly in an html document and it works ok.
Would appreciate any help.
This is the code that generates the html in the PHP script (it's passed through JSON):
$quadrePrincipal=$quadrePrincipal."
<div id=\"uploadI\">
<form action=\"testForm.php\" method=\"post\" enctype=\"multipart/form-data\">
<fieldset>
<INPUT name=\"comentari\" type=\"text\"><br />
</fieldset>
</div>";
$informacio=$informacio."
<fieldset>
<input type=\"submit\" name=\"submitBtn\" class=\"sbtn\" value=\"Alta ficha\" /><br />
</fieldset>
</form>";
This is the test in a simple html document:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" media="all" href="../css/editora.css" />
<title>Test Form</title>
</head>
<body>
<table>
<tr>
<td id="quadrePrincipal">
<div id="uploadI">
<form action="testForm.php" method="post" enctype="multipart/form-data">
<fieldset>
<INPUT name="comentari" type="text"><br />
</fieldset>
</div>
</td>
<td id="informacio">
<fieldset>
<input type="submit" name="submitBtn" class="sbtn" value="Alta ficha" /><br />
</fieldset>
</form>
</td>
</tr>
</table>
</body>
</html>
And here is a snapshot of the resulting html for both, from Firebug. The only strange thing I have seen is that the form is closed inside the first TD, but it does the same for both, and one is working fine:
(when it says "Direct" on the right side it means directly written in an html document)
[img]http://img87.imageshack.us/img87/9649/ajaxdirect.th.gif[/img]
Smoke is coming out from my head right now :confused: