Mutliple files upload

Ads
 

Mutliple files upload

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@page language="java"%>
    <%@page import="java.sql.*"%>
    <html>
        <head>
            <title>Post Available Bench</title>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="css/masterStyle.css" />
           <script type="text/javascript">
           function getOptions1(Countrytype) {
               var list;
               var list1;
               var listValue;
               var listValue1;
               if (Countrytype == "India") {
               list = new Array("Andrapradesh","Bihar","Gujarat","Karnataka","Kerala","Madhya Pradesh","Maharastra","Orissa","Tamilnadu");
               listValue = new Array("Andrapradesh","Bihar","Gujarat","Karnataka","Kerala","Madhya Pradesh","Maharastra","Orissa","Tamilnadu");
               list1 = new Array("Hyderabad","Patna","Ahmedabad","Benguluru","Kochi","Bhopal","Mumbai","Cuttack","Chennai");

               listValue1=new Array("Hyderabad","Patna","Ahmedabad","Benguluru","Kochi","Bhopal","Mumbai","Cuttack","Chennai");
               }

               for (var i = 0; i < document.benchForm.country.length; i++) { //Clear the 2nd menu
               document.benchForm.state.options[i] = null;
               document.benchForm.city.options[i] = null;
               }
               for (var i = 0; i < list.length; i++) { //Repopulate 2nd menu
               document.benchForm.state.options[i] = new Option(list[i],listValue[i],0,0);
               document.benchForm.city.options[i] = new Option(list1[i],listValue1[i],0,0);
               }
               }


          function addRow(){

                   var tbody = document.getElementById("tbodyId"); 


                  var current_row=document.createElement("TR");                
                  var current_cell1=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="checkbox";
                  input.id="active";
                  input.name="active";            
                  current_cell1.appendChild(input);
                  current_row.appendChild(current_cell1);        

                  var current_cell2=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="text";
                  input.id="resourceName";
                  input.name="resourceName";            
                  current_cell2.appendChild(input);
                  current_row.appendChild(current_cell2);        

                  var current_cell3=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="text";
                  input.id="expYears";
                  input.name="expYears";            
                  current_cell3.appendChild(input);
                  current_row.appendChild(current_cell3);        


                  var current_cell4=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="text";
                  input.id="primaryskill";
                  input.name="primaryskill";            
                  current_cell4.appendChild(input);
                  current_row.appendChild(current_cell4);

                  var current_cell5=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="text";
                  input.id="available";
                  input.name="available";            
                  current_cell5.appendChild(input);
                  current_row.appendChild(current_cell5);

                  var current_cell6=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="text";
                  input.id="expires";
                  input.name="expires";            
                  current_cell6.appendChild(input);
                  current_row.appendChild(current_cell6);

                  var current_cell7=document.createElement("TD");
                  var input=document.createElement("INPUT");
                  input.type="hidden";
                  input.id="companyName";
                  input.name="companyName"; 
                  input.value="<%= session.getAttribute( "theName" ) %>";
                  current_cell7.appendChild(input);
                  current_row.appendChild(current_cell7);


                  tbody.appendChild(current_row);


          }

          function generatenew()
          {
          var d=document.getElementById("div");
          d.innerHTML+="<p><input type='text'  name='otherprimaryskill'>";
          }

          function generatenew1()
          {
          var d=document.getElementById("div1");
          d.innerHTML+="<p><input type='text' name='othersecondaryskill'>";
          }

          function getOptions(skilltype) {
                var list;
                var listValue;
                if (skilltype == "Java") {
                    list = new Array("CoreJava","J2EE","J2SE","Struts","Hibernet","Springs","JSP","Servlet","JavaScript");
                    listValue = new Array("CoreJava","J2EE","J2SE","Struts","Hibernet","Springs","JSP","Servlet","JavaScript");
                }
                if (skilltype == ".NET") {
                    list = new Array("ASP.NET","C#","VB.NET");
                    listValue = new Array("ASP.NET","C#","VB.NET");
                }
                if (skilltype == "Database") {
                    list = new Array("MySql","SQL","oracle");
                    listValue = new Array("MySql","SQL","oracle");
                }
                for (var i = 0; i < document.benchForm.primaryskill.length; i++) { //Clear the 2nd menu
                    document.benchForm.Skills.options[i] = null;
                }
                for (var i = 0; i < list.length; i++) { //Repopulate 2nd menu
                    document.benchForm.Skills.options[i] = new Option(list[i],listValue[i],0,0);
                }
            }


          function f2Submit() {
              document.benchForm1.action="PostController"

              document.benchForm1.submit();
              alert('Form Submitted');
              }




          function f1Submit() {
                  document.benchForm.action="PostavailableController"
                  document.benchForm.submit();
            }



                  function submitAll() {


                  f2Submit();
                  f1Submit();



                  }




      </script>
      </head>
      <% String message = (String) request.getAttribute("message");
      String error = (String) request.getAttribute("error");
        String theName = (String) session.getAttribute("theName");
      %>
       <% if (theName== null || theName.equals("")) {
                        request.setAttribute("error", "User Session Expired");
        %>
        <jsp:forward page="Register.jsp"/>
        <%
                    }
        %>
       <body>


            <div id="headerWrapper">
                <div id="header">

                    <p><center><font size="5"/> Post Available Bench</center></p>
                </div>
            </div>
            <form name="benchForm" id="benchForm" action="PostavailableController" method="POST"  >







                    <table width="100%" align="center">
                    <tr>
                            <td align="right"></td>
                            <td align="left"> <input type="hidden" name="companyName" value="<%= session.getAttribute( "theName" ) %>" size="20" value=""></td>
                        </tr>

                       <tr>
    <td align="right">Country </td>

    <td align="left">:
    <select name="country" onchange="getOptions1(this.value)">
    <option value="">Select Country</option>
    <option value="India">India</option>
    <option value="USA">USA</option>
    <option value="UK">UK</option>
    <option value="Singapore">Singapore</option>
    <option value="Australia">Australia</option>

    </select>
    </td>
    </tr>
                        <tr>
    <td align="right">State</td>
    <td align="left">:<select name="state" >
    <option value="">Select State</option>
    </select>
    </tr>
    <tr>
    <td align="right">City</td>
    <td align="left">:<select name="city" >
    <option value="">Select City</option>
    </select>
    </tr>
                        <tr>
                            <td align="right">Industry</td>
                            <td align="left">:
                                <select name="industry">
                                <option value="IT Services">IT Services</option>
                                      <option value="IT Product">IT Product</option>
                                           <option value="ITES">ITES</option>
                                                <option value="Other">Other</option>

                                </select>
                            </td>
                        </tr>


    <tr>
    <td align="right">Primary Skill:</td>
     <td align="left"> <select name="primaryskill" onchange="getOptions(this.value)">
      <option value="">Select Skills</option>
        <option value="Java">Java</option>
        <option value=".NET">.NET</option>
        <option value="Database">Database</option>

      </select> </td>
      <tr>
       <td>

                   <div id="div"  align="right" >
                            <input type="button" value="Other Skills"  onclick="generatenew()" class="BtnStyle"></div>
                                </td>

      </tr>


      <tr>
      <td align="right">
      Secondary Skill:</td>
      <td align="left"><select  name="Skills" >
      <option value="">Select Skills</option>
      </select>
    </td>
     </tr>                   
     </center>
     <tr>
                            <td>

                   <div id="div1" align="right" >
                            <input type="button" value="Other Skills"  onclick="generatenew1()" class="BtnStyle"></div>
                                </td>
                            </tr>
     <tr>
                            <td align="right">Name</td>
                            <td align="left">: <input type="text" name="name" size="20" value=""></td>
                        </tr>
                        <tr>
                            <td align="right">Title</td>
                            <td align="left">:
                                <select name="title">

                                    <option value="Mr.">Mr.</option>
                                    <option value="Mrs.">Mrs.</option>
                                    <option value="Ms.">Ms.</option>

                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">Role</td>
                            <td align="left">:
                                <select name="role">
                                <option value="Head of the Company">Head of the Company</option>
                            <option value="india">Head of the Company</option>
                            <option value="Head of HR">Head of HR</option>
                            <option value="Head of Talent Acquisition">Head of Talent Acquisition</option>
                            <option value="Head of Delivery">Head of Delivery</option>
                            <option value="Head of Technology Practice">Head of Technology Practice</option>
                            <option value="Head of Commercial">Head of Commercial</option>
                            <option value="Head of Operations">Head of Operations</option>


                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">Email</td>
                            <td align="left">: <input type="text" name="mail" size="20" value=""></td>
                        </tr>
                        <tr>
                            <td align="right">Phone</td>
                            <td align="left">: <input type="text" name="phone" size="20" value=""></td>
                        </tr>
                        <!--  <tr>
                             <td align="right">Availability date</td>
                             <td align="left">: <input type="text" id="demo1" name="availabilityDate" size="20">
                             <a href="javascript:NewCal('demo1','DDMMYYYY',false,24)"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>

                             </td>
                         </tr>
                          <tr>
                             <td align="right">Availability expires on</td>
                             <td align="left">: <input type="text" id="demo2" name="availabilityExpires" size="20">
                             <a href="javascript:NewCal('demo2','DDMMYYYY',false,24)"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
                             </td>
                         </tr>-->
                        <tr>
                            <td align="right">Experience Years :</td>
                            <td align="left">

                                <select name="expYears">
                                     <%
                                            for (int i = 0; i < 10; i++) {

                                %>
                                <option value="<%=i%>"><%=i%></option>
                                <%
                                            }
                                %>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">No of Resource Available :</td>
                            <td align="left">
                                 <select name="noOfResources">
                                     <%
                                            for (int i = 0; i < 10; i++) {

                                %>
                                <option value="<%=i%>"><%=i%></option>
                                <%
                                            }
                                %>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">Comments :</td>
                            <td align="left">  <textarea name="comments" rows="5" cols="20"></textarea></td>
                        </tr>

                    </table>
                    <br/>

       </form>

                <form name="benchForm1" id="benchForm1" action="PostController" method="POST"  >


              <body onload="addRow();"> 

            <center> <table border="2" style="border-color: black;border-style: solid name=Resource" >
                    <tr bgcolor="yellow">
                        <th>Active</th>
                        <th>Resource Name</th>
                        <th>Experience</th>
                        <th>Skills</th>
                        <th>Available On</th>
                        <th>Expires On</th>
                    </tr></center>


                    <tbody id="tbodyId"></tbody>
    <tr >
      <center> <td > 
       <input type="button" value="Add" onclick="addRow();" /> 
            </td>    </center>  
     </tr>

        </table>  

               </center> 


               </form>


    <form name="frm" action="javascript:submitAll()" method="GET">

            <center> <input type="submit"  value="Submit" class="BtnStyle" > </center>


          </form>

           <center>
           <div id="footer">
                <hr />
                <div id="copyright">
                    <p>&copy;&nbsp;2011, ShareMyResources. All Rights Reserved</p>
                </div>

                <div id="footerNav">
                    <ul>
                        <li><a href="#">About</a></li>
                        <li><a href="#">Advertise</a></li>
                        <li><a href="#">Sitemap</a></li>
                        <li><a href="#">Terms</a></li>
                        <li><a href="#">Career</a></li>
                        <li><a href="#">Contact Us</a></li>
                    </ul>
                </div>
            </div>
           </center>

        </body>
    </html>

Hi sir,

   This my coding in this i have two forms and in second form i have to upload resume inside the grid view of the table and finally if i submit the page,two form with resume also want to submit i was struggling this issue for so many days so please send the solution for this problem as soon as possible...

Regards, R.Santhosh.

View Answers

Ads









Related Tutorials/Questions & Answers:
Mutliple files upload
Mutliple files upload  Hi Sir, Am doing a project in Jsp and Servlets, i want to upload multiple files inside the grid of the table, and submit... the following link: http://www.roseindia.net/jsp/file_upload
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Advertisements
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Mutliple files upload
Mutliple files upload   <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import... to upload resume inside the grid view of the table and finally if i submit the page,two
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Upload and Download multiple files
Upload and Download multiple files  Hello Sir/Madam, I need a simple code for upload and download multiple files(it may be image,doc... link: http://www.roseindia.net/jsp/file_upload/uploadingMultipleFiles.shtml
Upload and Download Large files in jsp
Upload and Download Large files in jsp  I am not able to download large files (>200mb) from any server. I need a code to download and upload large files (atleast 4 gb) to a server using jsp page
File Upload and Retrive files
File Upload and Retrive files  Can any body help me am getting an error in uploading file. into mysql database.... thank's in advance
How to upload files to server using JSP/Servlet?
How to upload files to server using JSP/Servlet?  How to upload files to server using JSP/Servlet
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
Source file upload by attaching multiple files
Source file upload by attaching multiple files  Hi, I am trying to develop a file upload with multiple files attached functionality in java(like in gmail or in picasa). The source I found so far will select a single file. When I
Source file upload by attaching multiple files
Source file upload by attaching multiple files  Thanks for the answer. The answer posted in this link I want to have a single text box and when i... a provision to attach multiple images/files like in gmail. Is there any solution
how to upload multiple files in jsp and saving the path in database and the file in folder
how to upload multiple files in jsp and saving the path in database and the file in folder  how to upload multiple files in jsp and saving the path in database and the file in folder I have created a form for the upload of files
Creat a folder, inside it upload and download files in jsp and mysql
Creat a folder, inside it upload and download files in jsp and mysql  Create one or more folder .inside it we can upload and download multiple files   Here is an application that will upload the file and save
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  Hi, I have tried dis example, I have made d DB luk lik wht u have posted, still der is some problem,My program creates class file
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  How to create d db for upload files using bolb i m followin dat upload file in db tutorial   Create a table named 'file
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations  how to write code to attach multiple files and upload using spring mvc 2.o with xml configuration with out annotations? please
UPLOAD
UPLOAD  how to upload image using html
upload image data
upload image data  Hii Upload image dat in csv files
upload image data
upload image data  Hii Upload image dat in csv files
files
/core/files/storeobjectsinFile.html
files uploding and downloading codes
files uploding and downloading codes  any one know JSP codes for upload files,download files and delete files from a created virtual memory
Retrieving list of uploaded files.
Retrieving list of uploaded files.  I need to retrieve list of files... files on a website. its uploaded. now the file resides in a directory in the server. now the list of uploaded files should be showing in page where other users can
AJAX file upload
AJAX file upload If you want to upload file asynchronously means without... as ?webtoolkit.aim.js?. The same AJAX functionality is used by Gmail to upload attachment files. URL for Code http://www.webtoolkit.info/ajax-file-upload.html
image upload in webapp/upload folder
image upload in webapp/upload folder  sir i want to store upload image in my project directory WebApp/Upload_image/ pls send the jsp servlet code when i upload the image one error found "system cannot found the specified path
Upload file without brouse button
Upload file without brouse button  Hi i want to upload 7 files without using browse button . I am using jscript to get the files and to view the files (.jpeg) .But I am not able to enter that address into file field can any body
header files
header files   do you have a all header files of java
multiple file upload at a time like gmail
multiple file upload at a time like gmail  I want to upload multiple files at a time like gmail. is there any possiblity/solution to do that?   Hi Friend, Please visit the following link: Upload Multiple Files Thanks
upload video
upload video  hi sir i want to code of upload and download video in mysql database using jsp... and plz give advice which data type is used to store video in table

Ads