Home Answers Viewqa JavaScriptQuestions this is my file upload page, here i am not getting tags input field value to my servlet,please suggest a solution?

 
 


lavanya satyavarapu
this is my file upload page, here i am not getting tags input field value to my servlet,please suggest a solution?
0 Answer(s)      6 months and 18 days ago
Posted in : JavaScript Questions

<html>
<head>
    <script type="text/javascript">
    var counter =1;


    function UpdateMultiple () {
        var fileInput = document.getElementById ("fileInput");
    }
    function AddFileUpload() {

    var div = document.createElement('DIV');
    div.innerHTML =
        '<tr><td>select files to upload <input id="file' + counter + '" name = "file' + counter +
        '" type="file" /></td></tr>' 
        + '<input id="Button' + counter + '" type="button" ' + 'value="Remove" onclick = "RemoveFileUpload(this)" />'+'Tag Here<input id="tag'+ counter +'"name="tags' + counter +'"type="text"/>'+'<dfn>Enter Tags with Comma Separated</dfb>';
        document.getElementById("FileUploadContainer").appendChild(div);

        counter++;

    }
    function RemoveFileUpload(div) {
        document.getElementById("FileUploadContainer").removeChild(div.parentNode);
    }
    </script>
</head>
<body>
    <form action="MultifileServ" method="post"  enctype="multipart/form-data">
    <table>
        <tr><td>Incident Location<input type="text" name="incidentlocation"></td></tr>
        <tr><td>Incident Time<input type="time" name="incidenttime"></td></tr>
        <tr><td>Incident Date<input type="time" name="incidentdate"></td></tr>   
        <tr><td>Select files to upload: <input id="fileInput" type="file" name="file0"/>
        Tag Here <input id="tag1" type="text" name="tags0"><dfn>Enter Tags with Comma separated</dfn> </td></tr>
        <tr><td><input id="Button1" onclick="AddFileUpload()" style="height: 27px; width: 74px;" tabindex="25" type="button" value="New File"/></td></tr>
        <tr><td><div id="FileUploadContainer"></div></br></td></tr>

        <tr><td><input type="submit" value="Upload File" /></td></tr>

    </table>
    </form>
</body>
</html>
View Answers









Related Pages:

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.