Please share your ideas. I am using SharePoint 2010. Currently when uploading files to a document library, first the upload form is opening to upload the document and then the edit form. I would like to have both this in the same form. I am trying to create a webpart page with the controls to upload the file to document library and assign values to the fields in the library. I am looking for some javascript for doing this. Is there any other way of achieving this? Please share any sample code.
<label for="title">Enter the title for this document:</label> <input type="text" id="title"><br/><br/>
<input id="inputFile" type="file"/><br/><br/>
<input id="uploadDocumentButton" onclick="UploadDocument()" type="button" value="Upload Document"/><script type="text/javascript">
function UploadDocument() {
//javascript to upload the file to MyLibrary and update the title field
}
</script>