I am facing problem in submitting the form through JavaScript, i have done it earlier also but this time its not working, it says an error like Object does not support this property or method.. I am using the following code:

document.myForm.dnld.value=i;
//document.myForm.submit();
document.myForm.action="upload.jsp?dnld="+i;
document.forms[0].submit();

Please help me