Solved

Submitting Multiple dynamicly created html forms to a single servlet class

Posted on 2007-12-02
13
522 Views
Last Modified: 2013-11-24
hi
im creating a timesheet for my employees , i got stuck almost at the end.
im unable to process the data that is sent from the multiple dynamic forms that get created using the code below:-

the major problem is im getting null values and i dont know how to recive the correct values for each form. i tried many ways such as request.getParameter("document.forms[s].ProName.value") etc
can someone please help here ?i just need the values of the forms transfered to the servlet thanks.

package TimeSheet;

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

import java.sql.*;

import java.lang.Object.*;

import java.util.*;

import java.text.*;

public class AddMulti extends HttpServlet

{

 

		double OverAllTotal =0;

		double OverAllReg =0;

		double hours = 0;

		double over = 0;

		double Hours =0;

		double over2 = 0;

		double reg = 0;

		double Total = 0;

		String[] day ={"2007","2008","2009","2010","2011"};

		boolean empty = false;

		boolean timeout = false;

  		NumberFormat nf1 = NumberFormat.getInstance();

 

 

 

	public void doGet( HttpServletRequest request,HttpServletResponse response )throws IOException, ServletException

	{

 

		StringBuffer html = new StringBuffer();

		HttpSession session = request.getSession();

		Employees e = new Employees();

		String num = request.getParameter("ProNum");

 

		String sday = request.getParameter("sday");

		String smonth = request.getParameter("smonth");

		String syear = request.getParameter("syear");

		String id = (String)session.getAttribute("userId");

		String name = (String)session.getAttribute("username");

 

		String eday = request.getParameter("eday");

		String emonth = request.getParameter("emonth");

		String eyear = request.getParameter("eyear");

       		String SDATE = sday + "-" + smonth + "-" + syear;

      		String EDATE = eday + "-" + emonth + "-" + eyear;

 

		Calendar cal = new GregorianCalendar();

		cal.set(Calendar.HOUR, 0);

		cal.set(Calendar.MINUTE, 0);

		cal.set(Calendar.SECOND, 0);

 

		SimpleDateFormat dd = new SimpleDateFormat("dd");

		SimpleDateFormat MM = new SimpleDateFormat("MM");

		SimpleDateFormat yyyy = new SimpleDateFormat("yyyy");

		java.util.Date d = cal.getTime();

 

		String day = dd.format(d);

		String month = MM.format(d);

		String year = yyyy.format(d);

		String DATE = day + "-" + month + "-" + year;

 

 

 

		String[] days ={"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14",

						"15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28",

						"29", "30", "31"};

		String[] months={"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};

		String[] years ={"2007","2008"};

	 

 

 

 

//get project list from database

/********************************************************************/

		Vector vv = e.getProjectList();

		Iterator vvi = vv.iterator();

		String ProName[] = new String[1000];

		int a=0;

		int b=0;

		try

		{

			while( vvi.hasNext() )

			{

				e = ( TimeSheet.Employees )vvi.next();

 

				ProName[a] = e.getProName();

				a++;

				b++;

			}

		}

		catch(Exception er)

		{

			System.out.println("An error :" + er);

		}

/*********************************************************************/

 

		response.setContentType("text/html");

		PrintWriter out = response.getWriter();

		int z = 1;

		int i=0;

		String docType =

		"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +

		"Transitional//EN\">\n";

 

		out.println(docType);

		out.println("<HTML><HEAD><title>Projet Summary</title>");

 

 

		out.println("<SCRIPT LANGUAGE=JavaScript>");

	 	out.println("function submitForms()");

		out.println("{");

// here im only submiting the first 2 forms just for testing

		out.println("document.form1.submit();");

		out.println("alert('f1')");

	 	out.println("document.form2.submit();");

		out.println("}");

		out.println("</SCRIPT>");

		out.println("</HEAD>");

		out.println("<body face=georgia>  " +

		"<table width=97% border=0>" +

        "<tr>" +

          "<td bgcolor=#FFFFFF width=62 height=11></td>" +

				"</tr>" +

		   "</table>" +

		"<table width=97% height=204 border=0>" +

 		 "<tr>" +

 	   "<td height=198 align=center valign=middle ><table width=572 border=0>" +

        "<tr>" +

          "<td width=89>&nbsp;</td>" +

          "<td width=43><font color=#336699 size=3><img src=A.bmp></font></td>" +

          "<td width=426 nowrap><font color=#336699 size=3>DAILY TIME SHEET</font><font size=3> <em><font color=#FF0000>ACE - JORDAN</font></em></font></td>" +

        "</tr>" +

      "</table>" +

      "<div align=center>" +

        "<table>" +

            "<p align=left> " +

            "<tr> " +

              "<td width=103 height=24><font color=#336699 size=2>Employee Name</font></td>" +

              "<td width=258><font size=2> " +

                "<input name=Emp type=text  size=43 value= " + name + " READONLY >" +

                "<input type=hidden name=EmpName value= " + name + ">" +

              "</font></td>" +

            "</tr>" +

            "<tr> " +

              "<td height=24><font color=#336699 size=2>Employee Number</font></td>" +

              "<td><font size=2>" +

                "<input name=empnum type=text value=" + id + " size=43 READONLY>" +

                "<input type=hidden name=empnum value=" + id + " size=43 >" +

              "</font></td>" +

            "</tr>" +

        "</table>" +

        "<blockquote>" +

            "<blockquote>" +

              "<p><font color=#336699 size=2 >" +

                "Day " +

                "<select name=day size=1>" );

				  out.println("<option value= " + day + " selected>" + day + "</option>" +

				 "</select>" +

                 "Month " +

                 "<select name=month size=1>" );

          	      out.println("<option value= " + month + " selected>" + month  + "</option>" +

          	       "</select>" +

        	       "Year " +

        	       "</font><font size=2 >" +

                   "<select name=year size=1>" );

				  out.println("<option value= " + year + " selected>" + year + "</option>" +

                 "</select>" +

			"</font></p>" +

             "<p></p>");

 

			//loop according to number of days

			while ( z < 3 )

			{

				out.println("<form name=form"+ z +" method=post  action=../servlet/TimeSheet.AddMultiInfo> " +

				"<table width=627 border=1 align=center bordercolor=#FFFFFF>" + "TimeSheet Date : " + DATE +

				"<tr>" +

				"<td nowrap bgcolor=#666666>&nbsp;</td>" +

				"<td nowrap bgcolor=#666666><div ><font  color=#FFFFFF>Project Name & Number</font></div></td>" +

				"<td nowrap bgcolor=#666666><div><font color=#FFFFFF>Project Section </font></div></td>" +

				"<td nowrap bgcolor=#666666><font color=#FFFFFF>Hours</font></td>");

				int f = 1;

				//show user 6 projects to chose from

				for(f = 1 ; f < 7 ; f++)

				{

					out.println("<tr>" +

					"<td bgcolor=#E0E0E0 nowrap><div align=center>" +

					"<input name=checkbox"+ f +" type=checkbox value=checkbox checked disabled >" +

					"</div></td>" +

					"<td bgcolor=#E0E0E0 nowrap><font color=#000000 >" +

					"<select name=ProName"+ f +" id=pname"+ f +" onChange=Rotate2();EnableCheckbox2Special();>");

					for(int c = 0 ; c < 45 ; c++)

					{

					out.println("<option value=" + ProName[c] + ">" +  ProName[c]);

					}

					 out.println("<option value=0 selected>Select Your Project</option>" +

					"</select>" +

					"</font></td>");

 

					out.println("</select></td> " +

					"<td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2>" +

					"<select name=Sec"+ f +"  size=1 >" +

					"<option value=A selected>A</option>" +

					"<option value=AD>AD</option>" +

					"<option value=D>D</option>" +

					"<option value=E>E</option>" +

					"<option value=M>M</option>" +

					"<option value=R>R</option>" +

					"<option value=S>S</option>" +

					"<option value=ST>ST</option>" +

					"<option value=MA>MA</option>" +

					"<option value=WA>WA</option>" +

					"<option value=WW>WW</option>" +

					" </select>" +

					" </font>" +

					"</div></td>" +

					"<td bgcolor=#E0E0E0 nowrap><input name=hours"+ f +" type=text onChange=t(); value=0 size=5 maxlength=3></td>" +

					"</tr>" +

					"<tr> ");

				}

			out.println("<td colspan=6 align=right nowrap bgcolor=#E0E0E0><font color=#FF0000>TOTAL</font> " +

			"<input name=Total"+ f +"  type=text id =tot value=0 size=5 maxlength=5  READONLY></td>" +

			"</tr>" +

			"<tr align=center bgcolor=#E0E0E0>");

			out.println("</td>" +

			"</tr>" +

			"</table>" +

			"<table width=100% border=0>" +

			"<tr>" +

			"<td width=56% height=52 align=center> <div align=left></div>" +

			"<div align=left>");

			out.println("</table>" +

			"<center>" +

			"<br>" +

 

			"<a href=/ProjectSummary.jsp></a>" +

			"</center>" +

			"</body></html>");

			z++;

			i++;

			}

 

			out.println("<input type=submit value=Submit onClick=submitForms()>");

 

/*

			out.println("<input type=submit value=Submit onClick=javascript: ");

 

				for(int t = 0 ; t < z ; t++)

				{

					out.println("document.forms["+(t+1)+"].submit();");

					System.out.println("Submitting Forms");

				}

			out.println(">");

			out.println("</SCRIPT>");

 

*/

     	 session.setAttribute("formsnum",z);

		}

 		public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException

		{

		   doGet(request, response);

		}

 

}

 

**********************************

**********************************

 

This is the servlet class that should retrieve the values and add them to the database.

 

package TimeSheet;

import java.io.*;

import javax.servlet.*;

import javax.servlet.http.*;

import java.sql.*;

import java.lang.Object.*;

import java.util.*;

import java.sql.Date;

import java.text.SimpleDateFormat;

import java.text.DateFormat;

import java.*;

 

public class AddMultiInfo extends HttpServlet

{

 

	public static Statement stmt;

	private static ResultSet rs, res = null;

	private static Connection con = null;

	private static ResultSet rs2 = null;

	private static Statement s2 = null;

	private static Connection con2 = null;

 

	private String [] proname = new String[10000];

	private String [] prosec = new String[10000];

	private String [] date = new String[10000];

	private boolean HasNext = false;

	private boolean exists = true;

	private boolean neww = false;

	private boolean Duplicate = false;

 

 

 

	public void doGet( HttpServletRequest request,HttpServletResponse response )throws IOException, ServletException

	{

 

		String day = request.getParameter("day");

		String month = request.getParameter("month");

		String year = request.getParameter("year");

        String DATE = day + "-" + month + "-" + year;

 

        neww = false;

        HasNext = false;

        Duplicate = false;

        exists = true;

 

 

		Employees e = new Employees();

		HttpSession session = request.getSession();

		String num = (String)session.getAttribute("userId");

		String name = (String)session.getAttribute("username");

 

 

 

MajorOuter:

{

/************************************************************************************************/

				Vector k = new Vector();

 

				int x=0;

				int s=1;

				int counter = 0;

			//	String n = (String)session.getAttribute("formsnum");

 

 

				try

				{

 

						//System.out.println("num : " + num);

						//System.out.println("username : " + name);

						//System.out.println("Project Name " + request.getParameter("ProName"));

 

						//loop once for each form... this value is passed from the other page

						// value passed is d ..... f < d... f<2 is for testing only

			 			for( int f=0 ; f< 2 ; f++ )

						{

							System.out.println("");

							System.out.println("#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#");

							System.out.println("");

 

						outer:

						{

							s=1;

							//maximun number of projects ...... for loop will break once the next project in not selected

			 				for( int i=1 ; i < 7 ; i++ )

							{

								if ( String.valueOf(request.getParameter("ProName" + s)).equals("null") || ( String.valueOf(request.getParameter("ProName" + s)).equals("0")))

								{

									break outer;

								}

								Employees emp = new Employees();

								System.out.println("EmpName :"  + name );

								System.out.println("empnum :"  + num );

								System.out.println("hours:"  + request.getParameter("hours" + s));

								System.out.println("<pro>:"  + request.getParameter("ProName"+s));

								System.out.println("<----->:"  + request.getParameter("this.document.form1.ProName" + s));

								System.out.println("<----->:"  + request.getParameter("this.document.form2.ProName" + s));

								System.out.println("<----->:"  + request.getParameter("this.document.form2.ProName2"));

								System.out.println("<----->:"  + request.getParameter("document.forms[s].ProName"));

								System.out.println("<----->:"  + request.getParameter("document.form1.ProName1"));

								System.out.println("<----->:"  + request.getParameter("document.form2.ProName2"));

								System.out.println("<----->:"  + request.getParameter("document.form3.ProName3"));

								System.out.println("<----->:"  + request.getParameter("document.form1.ProName1.value"));

								System.out.println("<----->:"  + request.getParameter("document.form1.ProName2.value"));

								System.out.println("<----->:"  + request.getParameter("document.form1.ProName3.value"));

								System.out.println("<----->:"  + request.getParameter("document.form2.ProName1.value"));

								System.out.println("<----->:"  + request.getParameter("document.forms[ thisFormName ].elements[ProName].value" ));

//								out.println("document.forms[ thisFormName ].elements['ProName'].value");

 

								System.out.println("");

								System.out.println("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");

								System.out.println("");

								/*

								emp.setEmpName(request.getParameter("EmpName"));

								emp.setEmpNum(request.getParameter("empnum"));

								emp.setProHours(request.getParameter("hours" + s ));

								emp.setProName(request.getParameter("ProName" + s ));

								//emp.setDate(String.valueOf(DATE));

								k.add(emp);

								s++;

								counter++;

 

								}

				

						}

					}

				}

				catch(Exception er)

				{

					System.out.println("An error :" + er);

				}

				int xy = 0;

				int f = 0;

 

/**********************************************************************************************/

 

				Iterator vi = k.iterator();

				int a =0;

				int sf = 1;

 				outer:

				{

				while (vi.hasNext())

				{

					System.out.println("**************************************");

			//		System.out.println("A new While loop");

					Duplicate = false;

					e = ( TimeSheet.Employees )vi.next();

			 		if( String.valueOf(e.getProName()).equals("null") )

			 		{

						System.out.println("project will not be added !!!!!!!!!!!!!");

						break outer;

					}

						iner:

						{

							if( Duplicate == false )

							{

					//			System.out.println("Attempting To AddMulti Record !!!!!!!!!!");

					//			e.addToDatabase();

								sf++;

								break iner;

 

							}

						}

			 	}

			 	try

				{

					System.out.println("Adding Confirmation!");

				// 	e.AddConfirm("yes");

				// 	response.sendRedirect("/Show.jsp");

				}

				catch(Exception ee)

				{

					System.out.println("An error in reading a record :" + ee);

				}

			}

		}

/**********************************************************************************************/

 

	}

 

	public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException, IOException

	{

	   doGet(request, response);

	}

	public static void ConnectToDataBase()throws SQLException

		{

			String driver = "com.mysql.jdbc.Driver";

			try

			{

				System.out.println( "=> loading driver:" );

				Class.forName(driver).newInstance();;

				String database = "jdbc:mysql://localhost:3306/time";

				con = DriverManager.getConnection(database , "root" , "0000");

				System.out.println( "=> connecting:" );

			}

			catch(Exception err)

			{

				System.out.println("error DBASE COnnection" + err );

			}

		}

}

 

the major problem is im getting null values and i dont know how to recive the correct values for each form. i tried many ways such as request.getParameter("document.forms[s].ProName.value") etc

can someone please help here ?i just need the values of the forms transfered to the servlet thanks.

Open in new window

0
Comment
Question by:Dj_maj
  • 7
  • 6
13 Comments
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 20392872
You get multiply valued parameters (in a String array) like this:
String[] pronames = request.getParameterValues("ProName");

assuming that the name of your multi-valued select in HTML is "ProName".

Then use a for loop to get each value in the array (check that the array itself is not null first, of course).
0
 

Author Comment

by:Dj_maj
ID: 20395781
well thanks for your reply , well i have used the following method which is what you said but it's not  effective because i want to be able to pick the value that i want without having to loop all the values.....what i want is to be able to use something like document.form1.item.value within the servlet or something similer to that if u get what i mean. Because i have to add each 1 form as a single enrty in the database . its also strange that the request.getParameter method allways return the value of the first fom.

out.println("<BODY BGCOLOR=\"#FDF5E6\">\n" +
                                              "<H1 ALIGN=CENTER>" + "" + "</H1>\n" +
                                              "<TABLE BORDER=1 ALIGN=CENTER>\n" +
                                              "<TR BGCOLOR=\"#FFAD00\">\n" +
                                              "<TH>Parameter Name");
                                  Enumeration paramNames = request.getParameterNames();
                                  while(paramNames.hasMoreElements())
                                  {
                                    String paramName = (String)paramNames.nextElement();
                                    out.println("<TR><TD>" + paramName + "\n<TD>");
                                    String[] paramValues = request.getParameterValues(paramName);
                                    if (paramValues.length == 1)
                                    {
                                      String paramValue = paramValues[0];
                                      if (paramValue.length() == 0)
                                        out.print("<I>No Value</I>");
                                      else
                                      {
                                        out.print((String)paramValue);
                                        }
                                    }
                                    else
                                    {
                                      out.println("<TD>");
                                      for(int i=0; i<paramValues.length; i++)
                                      {
                                        out.println("<TD>" + paramValues[i]);
                                                        }
                                      out.println("</TD>");
                                    }
                                  }
                      out.println("</TABLE>\n</BODY></HTML>");
0
 
LVL 26

Accepted Solution

by:
mrcoffee365 earned 500 total points
ID: 20396034
The API for HttpServletRequest is what it is.  You can check the calls here:
http://java.sun.com/products/servlet/2.3/javadoc/index.html

The values are not available as a DOM, which is what is offered by browsers to Javascript.

However, it also sounds as if you aren't sure how posted parameters are submitted to the Web server following the HTTP protocol.  The body is name=value pairs, all strings.  If the user has selected multiple options, then multiple values will be returned in a parameter like paramValues in your code snippet above.   If you don't want all of the values, then what do you want to happen?

>>its also strange that the request.getParameter method allways return the value of the first fom.

I'm not sure what you mean here -- everything submitted to the Web server is available in the request.  Only one form is submitted at a time.  That's the HTTP protocol, and it's how HTML is interpreted by the browsers.

Do you mean that you have multiple HTML forms on a single page, and there are multiple Submit buttons?  Or did you set up 1 Submit button, and think that somehow it would submit all of the forms?  HTML doesn't work that way.

If you make a mistake in your HTML and have several forms, with identically named parameters, and you don't check which form has been submitted (or you don't have a unique parameter in the form you can check), then you won't know on the server side which form has been submitted.
0
 

Author Comment

by:Dj_maj
ID: 20396279
ok i was working on the code and did somechanges , i have added a value to the name of parameter to make it uniqe from the other forms and it seemed to show the correct value from different forms. i guess now i can work on the while loops and stuff. but one last question before closing this question is why do i get only the first part ( word ) of the string when i use the request.getParameter() " i have some project names stored in the database that consist from few parts and i would like to have the whole line returned. any suggestions ?  
to make it more clear if i have the following value in a combobox field say " what time is itr"
the request.getParameter(0 returns the word "What" only!!!!!.
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 20396461
Congrats on getting more of the page working.

The whole parameter is submitted, not just part of it.  So when you say that you think you are only getting part of a value, then I think that only that value was submitted -- not the longer string you're expecting.

What is the HTML for the input parameter where you think you're only getting a partial value, and how are you reading it in Java?
0
 

Author Comment

by:Dj_maj
ID: 20396522
This is the part

"<td bgcolor=#E0E0E0 nowrap><font color=#000000 >" +
                              "<select name=ProName"+ f +" id=pname"+ f +" onChange=Rotate2();EnableCheckbox2Special();>");
                              for(int c = 0 ; c < 45 ; c++)
                              {
                              out.println("<option value=" + ProName[c] + ">" +  ProName[c]);
                              }
                               out.println("<option value=0 selected>Select Your Project</option>" +
                              "</select>" +
                              "</font></td>");
 
These values apear in full when loaded inside the combo box , but as i said upon retrival they are truncated.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:Dj_maj
ID: 20396539
i read the parameter from the servlet using
request.getParameter("ProName"+s)
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 20397390
Okay -- this doesn't show me the HTML that is generated.  Do you have a page, and can you do View Source on it?  Then cut and paste the HTML for the line with a value you think is truncated.  Whatever is in the HTML as the value will be posted to the server in the form, so probably the value in the HTML is not what you expect.  Or the parameter name you are using is not the same as what you are writing.

Something that might help you debug, on the server side, is to write out all of the parameters in the request.  Using the calls in the API, you can do something like this:
Enumeration params = request.getParameterNames();
while (params.hasMoreElements())
{
      String pName = (String) params.nextElement();
      System.out.println("Parameter-" + pName + "=" + request.getParameter(pName) );
}
0
 

Author Comment

by:Dj_maj
ID: 20398046
yeh sure , below is the whole generated HTML . i also tried ur code and still got the first word only. Anyway i hope this is not a big problem . will be waitting for your comments.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 

<HTML><HEAD><title>Projet Summary</title>

</HEAD>

<body face=georgia>  <table width=97% border=0><tr><td bgcolor=#FFFFFF width=62 height=11></td></tr></table><table width=97% height=204 border=0><tr><td height=198 align=center valign=middle ><table width=572 border=0><tr><td width=89>&nbsp;</td><td width=43><font color=#336699 size=3><img src=ACE.bmp></font></td><td width=426 nowrap><font color=#336699 size=3>DAILY TIME SHEET</font><font size=3> <em><font color=#FF0000>ACE - JORDAN</font></em></font></td></tr></table><div align=center><table><p align=left> <tr> <td width=103 height=24><font color=#336699 size=2>Employee Name</font></td><td width=258><font size=2> <input name=Emp type=text  size=43 value= null READONLY ><input type=hidden name=EmpName value= null></font></td></tr><tr> <td height=24><font color=#336699 size=2>Employee Number</font></td><td><font size=2><input name=empnum type=text value=null size=43 READONLY><input type=hidden name=empnum value=null size=43 ></font></td></tr></table><blockquote><blockquote><p><font color=#336699 size=2 >Day <select name=day size=1>

<option value= 03 selected>03</option></select>Month <select name=month size=1>

<option value= 12 selected>12</option></select>Year </font><font size=2 ><select name=year size=1>

<option value= 2007 selected>2007</option></select></font></p><p></p>

<form name=form1 method=post  action=/servlet/TimeSheet.AddMultiInfo> <table width=627 border=1 align=center bordercolor=#FFFFFF>TimeSheet Date : 03-12-2007<tr><td nowrap bgcolor=#666666>&nbsp;</td><td nowrap bgcolor=#666666><div ><font  color=#FFFFFF>Project Name & Number</font></div></td><td nowrap bgcolor=#666666><div><font color=#FFFFFF>Project Section </font></div></td><td nowrap bgcolor=#666666><font color=#FFFFFF>Hours</font></td>

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox1 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName1 type=text id=1ProName1>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

<option value=AL rameh -kafrein Road>AL rameh -kafrein Road

<option value=Albalqa Jarash Road>Albalqa Jarash Road

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Al-Sharq Housing-Marka>Al-Sharq Housing-Marka

<option value=Anuual leave>Anuual leave

<option value=Aqaba Intersection>Aqaba Intersection

<option value=Aqaba Logistic Village (OFFICE)>Aqaba Logistic Village (OFFICE)

<option value=Aqaba Logistic Village (SITE)>Aqaba Logistic Village (SITE)

<option value=Arab Mediacl Center-Emergency Extention (OFFICE)>Arab Mediacl Center-Emergency Extention (OFFICE)

<option value=Arab Mediacl Center-Emergency Extention (SITE)>Arab Mediacl Center-Emergency Extention (SITE)

<option value=Bereavement leave>Bereavement leave

<option value=Certified child leave>Certified child leave

<option value=Certified maternity leave>Certified maternity leave

<option value=Darmakee Villas>Darmakee Villas

<option value=Dengerous Sites>Dengerous Sites

<option value=Desert Amman/Aqaba Highway>Desert Amman/Aqaba Highway

<option value=Ein Janneh Road>Ein Janneh Road

<option value=Emar Tawer>Emar Tawer

<option value=Fuhais Bacaloria Road>Fuhais Bacaloria Road

<option value=Iraq support unit - US Embassy (OFFICE)>Iraq support unit - US Embassy (OFFICE)

<option value=Iraq support unit - US Embassy (SITE)>Iraq support unit - US Embassy (SITE)

<option value=Irbid-Mafraq Road>Irbid-Mafraq Road

<option value=Jarash Intrance Road>Jarash Intrance Road

<option value=Jereesh>Jereesh

<option value=Jordan Gate-EM Design Review>Jordan Gate-EM Design Review

<option value=Jordan Modern Hospital-Emergency Extention (OFFICE)>Jordan Modern Hospital-Emergency Extention (OFFICE)

<option value=Jordan Modern Hospital-Emergency Extention (SITE)>Jordan Modern Hospital-Emergency Extention (SITE)

<option value=King  Road - Madaba>King  Road - Madaba

<option value=Kofrenjeh-Dairalla Road>Kofrenjeh-Dairalla Road

<option value=Leave in lieu of overtime>Leave in lieu of overtime

<option value=Miscilmice Secondary Roads>Miscilmice Secondary Roads

<option value=Mwaqar Industrial city (OFFICE)>Mwaqar Industrial city (OFFICE)

<option value=Mwaqar Industrial city (SITE)>Mwaqar Industrial city (SITE)

<option value=Partday leave>Partday leave

<option value=Petrol Road>Petrol Road

<option value=Professional Development>Professional Development

<option value=Public holiday>Public holiday

<option value=Rawabi AL Mushaggar>Rawabi AL Mushaggar

<option value=Salt -  Alarda Road>Salt -  Alarda Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec1  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours1 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox2 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName2 type=text id=1ProName2>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

<option value=AL rameh -kafrein Road>AL rameh -kafrein Road

<option value=Albalqa Jarash Road>Albalqa Jarash Road

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Al-Sharq Housing-Marka>Al-Sharq Housing-Marka

<option value=Anuual leave>Anuual leave

<option value=Aqaba Intersection>Aqaba Intersection

<option value=Aqaba Logistic Village (OFFICE)>Aqaba Logistic Village (OFFICE)

<option value=Aqaba Logistic Village (SITE)>Aqaba Logistic Village (SITE)

<option value=Arab Mediacl Center-Emergency Extention (OFFICE)>Arab Mediacl Center-Emergency Extention (OFFICE)

<option value=Arab Mediacl Center-Emergency Extention (SITE)>Arab Mediacl Center-Emergency Extention (SITE)

<option value=Bereavement leave>Bereavement leave

<option value=Certified child leave>Certified child leave

<option value=Certified maternity leave>Certified maternity leave

<option value=Darmakee Villas>Darmakee Villas

<option value=Dengerous Sites>Dengerous Sites

<option value=Desert Amman/Aqaba Highway>Desert Amman/Aqaba Highway

<option value=Ein Janneh Road>Ein Janneh Road

<option value=Emar Tawer>Emar Tawer

<option value=Fuhais Bacaloria Road>Fuhais Bacaloria Road

<option value=Iraq support unit - US Embassy (OFFICE)>Iraq support unit - US Embassy (OFFICE)

<option value=Iraq support unit - US Embassy (SITE)>Iraq support unit - US Embassy (SITE)

<option value=Irbid-Mafraq Road>Irbid-Mafraq Road

<option value=Jarash Intrance Road>Jarash Intrance Road

<option value=Jereesh>Jereesh

<option value=Jordan Gate-EM Design Review>Jordan Gate-EM Design Review

<option value=Jordan Modern Hospital-Emergency Extention (OFFICE)>Jordan Modern Hospital-Emergency Extention (OFFICE)

<option value=Jordan Modern Hospital-Emergency Extention (SITE)>Jordan Modern Hospital-Emergency Extention (SITE)

<option value=King  Road - Madaba>King  Road - Madaba

<option value=Kofrenjeh-Dairalla Road>Kofrenjeh-Dairalla Road

<option value=Leave in lieu of overtime>Leave in lieu of overtime

<option value=Miscilmice Secondary Roads>Miscilmice Secondary Roads

<option value=Mwaqar Industrial city (OFFICE)>Mwaqar Industrial city (OFFICE)

<option value=Mwaqar Industrial city (SITE)>Mwaqar Industrial city (SITE)

<option value=Partday leave>Partday leave

<option value=Petrol Road>Petrol Road

<option value=Professional Development>Professional Development

<option value=Public holiday>Public holiday

<option value=Rawabi AL Mushaggar>Rawabi AL Mushaggar

<option value=Salt -  Alarda Road>Salt -  Alarda Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec2  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours2 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox3 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName3 type=text id=1ProName3>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

<option value=AL rameh -kafrein Road>AL rameh -kafrein Road

<option value=Albalqa Jarash Road>Albalqa Jarash Road

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Al-Sharq Housing-Marka>Al-Sharq Housing-Marka

<option value=Anuual leave>Anuual leave

<option value=Aqaba Intersection>Aqaba Intersection

<option value=Aqaba Logistic Village (OFFICE)>Aqaba Logistic Village (OFFICE)

<option value=Aqaba Logistic Village (SITE)>Aqaba Logistic Village (SITE)

<option value=Arab Mediacl Center-Emergency Extention (OFFICE)>Arab Mediacl Center-Emergency Extention (OFFICE)

<option value=Arab Mediacl Center-Emergency Extention (SITE)>Arab Mediacl Center-Emergency Extention (SITE)

<option value=Bereavement leave>Bereavement leave

<option value=Certified child leave>Certified child leave

<option value=Certified maternity leave>Certified maternity leave

<option value=Darmakee Villas>Darmakee Villas

<option value=Dengerous Sites>Dengerous Sites

<option value=Desert Amman/Aqaba Highway>Desert Amman/Aqaba Highway

<option value=Ein Janneh Road>Ein Janneh Road

<option value=Emar Tawer>Emar Tawer

<option value=Fuhais Bacaloria Road>Fuhais Bacaloria Road

<option value=Iraq support unit - US Embassy (OFFICE)>Iraq support unit - US Embassy (OFFICE)

<option value=Iraq support unit - US Embassy (SITE)>Iraq support unit - US Embassy (SITE)

<option value=Irbid-Mafraq Road>Irbid-Mafraq Road

<option value=Jarash Intrance Road>Jarash Intrance Road

<option value=Jereesh>Jereesh

<option value=Jordan Gate-EM Design Review>Jordan Gate-EM Design Review

<option value=Jordan Modern Hospital-Emergency Extention (OFFICE)>Jordan Modern Hospital-Emergency Extention (OFFICE)

<option value=Jordan Modern Hospital-Emergency Extention (SITE)>Jordan Modern Hospital-Emergency Extention (SITE)

<option value=King  Road - Madaba>King  Road - Madaba

<option value=Kofrenjeh-Dairalla Road>Kofrenjeh-Dairalla Road

<option value=Leave in lieu of overtime>Leave in lieu of overtime

<option value=Miscilmice Secondary Roads>Miscilmice Secondary Roads

<option value=Mwaqar Industrial city (OFFICE)>Mwaqar Industrial city (OFFICE)

<option value=Mwaqar Industrial city (SITE)>Mwaqar Industrial city (SITE)

<option value=Partday leave>Partday leave

<option value=Petrol Road>Petrol Road

<option value=Professional Development>Professional Development

<option value=Public holiday>Public holiday

<option value=Rawabi AL Mushaggar>Rawabi AL Mushaggar

<option value=Salt -  Alarda Road>Salt -  Alarda Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec3  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours3 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox4 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName4 type=text id=1ProName4>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

<option value=AL rameh -kafrein Road>AL rameh -kafrein Road

<option value=Albalqa Jarash Road>Albalqa Jarash Road

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Al-Sharq Housing-Marka>Al-Sharq Housing-Marka

<option value=Anuual leave>Anuual leave

<option value=Aqaba Intersection>Aqaba Intersection

<option value=Aqaba Logistic Village (OFFICE)>Aqaba Logistic Village (OFFICE)

<option value=Aqaba Logistic Village (SITE)>Aqaba Logistic Village (SITE)

<option value=Arab Mediacl Center-Emergency Extention (OFFICE)>Arab Mediacl Center-Emergency Extention (OFFICE)

<option value=Arab Mediacl Center-Emergency Extention (SITE)>Arab Mediacl Center-Emergency Extention (SITE)

<option value=Bereavement leave>Bereavement leave

<option value=Certified child leave>Certified child leave

<option value=Certified maternity leave>Certified maternity leave

<option value=Darmakee Villas>Darmakee Villas

<option value=Dengerous Sites>Dengerous Sites

<option value=Desert Amman/Aqaba Highway>Desert Amman/Aqaba Highway

<option value=Ein Janneh Road>Ein Janneh Road

<option value=Emar Tawer>Emar Tawer

<option value=Fuhais Bacaloria Road>Fuhais Bacaloria Road

<option value=Iraq support unit - US Embassy (OFFICE)>Iraq support unit - US Embassy (OFFICE)

<option value=Iraq support unit - US Embassy (SITE)>Iraq support unit - US Embassy (SITE)

<option value=Irbid-Mafraq Road>Irbid-Mafraq Road

<option value=Jarash Intrance Road>Jarash Intrance Road

<option value=Jereesh>Jereesh

<option value=Jordan Gate-EM Design Review>Jordan Gate-EM Design Review

<option value=Jordan Modern Hospital-Emergency Extention (OFFICE)>Jordan Modern Hospital-Emergency Extention (OFFICE)

<option value=Jordan Modern Hospital-Emergency Extention (SITE)>Jordan Modern Hospital-Emergency Extention (SITE)

<option value=King  Road - Madaba>King  Road - Madaba

<option value=Kofrenjeh-Dairalla Road>Kofrenjeh-Dairalla Road

<option value=Leave in lieu of overtime>Leave in lieu of overtime

<option value=Miscilmice Secondary Roads>Miscilmice Secondary Roads

<option value=Mwaqar Industrial city (OFFICE)>Mwaqar Industrial city (OFFICE)

<option value=Mwaqar Industrial city (SITE)>Mwaqar Industrial city (SITE)

<option value=Partday leave>Partday leave

<option value=Petrol Road>Petrol Road

<option value=Professional Development>Professional Development

<option value=Public holiday>Public holiday

<option value=Rawabi AL Mushaggar>Rawabi AL Mushaggar

<option value=Salt -  Alarda Road>Salt -  Alarda Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec4  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours4 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox5 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName5 type=text id=1ProName5>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

..........

//removed some projects to make text smaller

..........

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec5  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours5 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<tr><td bgcolor=#E0E0E0 nowrap><div align=center><input name=checkbox6 type=checkbox value=checkbox id= check checked disabled ></div></td><td bgcolor=#E0E0E0 nowrap><font color=#000000 ><select name=1ProName6 type=text id=1ProName6>

<option value=AL Albaiet Entrchange>AL Albaiet Entrchange

<option value=AL Mushaggar>AL Mushaggar

<option value=AL rameh -kafrein Road>AL rameh -kafrein Road

<option value=Albalqa Jarash Road>Albalqa Jarash Road

<option value=Al-Joaidieh Land Slide>Al-Joaidieh Land Slide

<option value=AL-Mergha Road>AL-Mergha Road

<option value=Al-Sharq Housing-Marka>Al-Sharq Housing-Marka

<option value=Anuual leave>Anuual leave

<option value=Aqaba Intersection>Aqaba Intersection

<option value=Aqaba Logistic Village (OFFICE)>Aqaba Logistic Village (OFFICE)

<option value=Aqaba Logistic Village (SITE)>Aqaba Logistic Village (SITE)

<option value=Arab Mediacl Center-Emergency Extention (OFFICE)>Arab Mediacl Center-Emergency Extention (OFFICE)

<option value=Arab Mediacl Center-Emergency Extention (SITE)>Arab Mediacl Center-Emergency Extention (SITE)

<option value=Bereavement leave>Bereavement leave

<option value=Certified child leave>Certified child leave

<option value=Certified maternity leave>Certified maternity leave

<option value=Darmakee Villas>Darmakee Villas

<option value=Dengerous Sites>Dengerous Sites

<option value=Desert Amman/Aqaba Highway>Desert Amman/Aqaba Highway

<option value=Ein Janneh Road>Ein Janneh Road

<option value=Emar Tawer>Emar Tawer

<option value=Fuhais Bacaloria Road>Fuhais Bacaloria Road

<option value=Iraq support unit - US Embassy (OFFICE)>Iraq support unit - US Embassy (OFFICE)

<option value=Iraq support unit - US Embassy (SITE)>Iraq support unit - US Embassy (SITE)

<option value=Irbid-Mafraq Road>Irbid-Mafraq Road

<option value=Jarash Intrance Road>Jarash Intrance Road

<option value=Jereesh>Jereesh

<option value=Jordan Gate-EM Design Review>Jordan Gate-EM Design Review

<option value=Jordan Modern Hospital-Emergency Extention (OFFICE)>Jordan Modern Hospital-Emergency Extention (OFFICE)

<option value=Jordan Modern Hospital-Emergency Extention (SITE)>Jordan Modern Hospital-Emergency Extention (SITE)

<option value=King  Road - Madaba>King  Road - Madaba

<option value=Kofrenjeh-Dairalla Road>Kofrenjeh-Dairalla Road

<option value=Leave in lieu of overtime>Leave in lieu of overtime

<option value=Miscilmice Secondary Roads>Miscilmice Secondary Roads

<option value=Mwaqar Industrial city (OFFICE)>Mwaqar Industrial city (OFFICE)

<option value=Mwaqar Industrial city (SITE)>Mwaqar Industrial city (SITE)

<option value=Partday leave>Partday leave

<option value=Petrol Road>Petrol Road

<option value=Professional Development>Professional Development

<option value=Public holiday>Public holiday

<option value=Rawabi AL Mushaggar>Rawabi AL Mushaggar

<option value=Salt -  Alarda Road>Salt -  Alarda Road

<option value=Salt Ring Road>Salt Ring Road

<option value=0 selected>Select Your Project</option></select></font></td>

</select></td> <td bgcolor=#E0E0E0 nowrap> <div align=left><font color=#000000 size=2><select name=1Sec6  size=1 id=sec><option value=A>A</option><option value=AD>AD</option><option value=D selected>D</option><option value=E>E</option><option value=M>M</option><option value=R>R</option><option value=S>S</option><option value=ST>ST</option><option value=MA>MA</option><option value=WA>WA</option><option value=WW>WW</option> </select> </font></div></td><td bgcolor=#E0E0E0 nowrap><input name=1hours6 type=text id= hours value=0 size=5 maxlength=3></td></tr><tr> 

<td colspan=6 align=right nowrap bgcolor=#E0E0E0><font color=#FF0000>TOTAL</font> <input name=Total1  type=text id =tot value=0 size=5 maxlength=5  READONLY></td></tr><tr align=center bgcolor=#E0E0E0>

</td></tr></table><table width=100% border=0><tr><td width=56% height=52 align=center> <div align=left></div><div align=left>

</table><center><br><a href=/ProjectSummary.jsp></a></center></body></html>

<input type=submit value=submitForms>

Open in new window

0
 

Author Comment

by:Dj_maj
ID: 20398086
i posted this code with only 1 form because the problem is occuring even with a single form , so i thought thier will be no need to post multple forms.
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 20398581
You didn't put quotes around your value= values.  So only the first token was assigned to the value.  Put quotes around them, and they'll be uploaded.

If you had debugged with the code fragment I gave you above, you would have seen that, too, and it probably would have helped you figure it out.
0
 

Author Comment

by:Dj_maj
ID: 20401080
sweet thanks for all your help.
0
 
LVL 26

Expert Comment

by:mrcoffee365
ID: 20401121
You're welcome, and good luck.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Receive file in Servlet 1 36
topping2 challenge 13 59
@SBGen Method 3 25
DO we need Java installed on a Windows PC and WHY ? 13 77
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now