[jQuery] form create

[jQuery] form create


I'm working on a multifile upload system and I found that my form
function does not work in IE while I have a workaround I wonder why
this code doesn't work in IE ?
thanks for your help Mike
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Test jQuery</title>
<link href="ajaxfileupload.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
    function addFormField() {
        var id = document.getElementById("id").value;
        $("#content").append("<form name='form" + id + "' id='form" + id +
"' action='' method='POST' enctype='multipart/form-data'
onsubmit='return ajaxFileUpload("+id+");'>");
        $("#form"+id).append("<img id='loading' src='loading.gif'
style='display:none;'>");
        $("#form"+id).append("<input id='fileToUpload"+id+"' type='file'
size='45' name='fileToUpload' class='input'
onchange='this.form.submit.click()'>");
        $("#form"+id).append("<input type='submit' name='submit'
value='submit' style='display: none;'' />");
        id = (id - 1) + 2;
        document.getElementById("id").value = id;
    }
</script>
<body>

<a href="#" onClick="addFormField(); return false;">Add</a>


<input type="hidden" id="id" value="1">
<div id="content">
</div>
</body>
</html>