passing values between jsp file through hyperlink in div tag

passing values between jsp file through hyperlink in div tag

<p>hi please help me to solve this. i have searchproj.jsp and updateproj.jsp. In searchproj.jsp values r retrieved from db as follows </p>

<pre class="prettyprint">&lt;%@ page import="vo.SearchProjVO"%&gt;   
&lt;%@ page language="java"%&gt;   
&lt;%@ page import ="java.sql.*"%&gt;   
&lt;HTML&gt;   
&lt;head&gt;   
&lt;meta http-equiv='Content-Type' content='text/html; charset=utf-8' /&gt;     
&lt;link type='text/css' rel='stylesheet' href='/css/crec.css' /&gt;    
&lt;script src="js/AdminHeader.js"&gt;&lt;/script&gt;    
&lt;jsp:include page="/jsp/admin/Adminmenu.jsp" &gt;   
&lt;/jsp:include&gt;   
&lt;%   
String contextPath = request.getContextPath();   
%&gt;   
&lt;script language="javascript"&gt; 
function validate()  
{ 
if(document.frm1.projid.value != "")  
{    
document.frm1.action="&lt;%=contextPath%&gt;/SearchProj";         
document.frm1.submit(); 
} 
if(document.frm1.projname.value != "")  
{    
document.frm1.action="&lt;%=contextPath%&gt;/SearchProj";         
document.frm1.submit(); 
} 
if(document.frm1.cost.value != "")  
{    
document.frm1.action="&lt;%=contextPath%&gt;/SearchProj";         
document.frm1.submit(); 
} 
if(document.frm1.manager.value != "")  
{    
document.frm1.action="&lt;%=contextPath%&gt;/SearchProj";          
document.frm1.submit();  
} 
if(document.frm1.projid.value=="" &amp;&amp; document.frm1.projname.value=="" &amp;&amp; document.frm1.cost.value=="" &amp;&amp; document.frm1.manager.value=="") 
{  
 alert("Please enter any one field."); 
} 
} 
&lt;/script&gt; 
&lt;script language="javascript"&gt; 
function gotoSearchProjAction() 
{  
validate(); 
} 
&lt;/script&gt; 
&lt;/head&gt; 
&lt;body&gt; 
&lt;form name="frm1" method="post"&gt; 
&lt;table width="100%" id='table1'  border="0" cellspacing="0" cellpadding="0"&gt;  
&lt;tr&gt;&lt;td valign="bottom"&gt;
&lt;span class="title"&gt;SEARCH PROJECT&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;  
&lt;tr&gt;&lt;td height="3" bgcolor="#EEEEEE"&gt;&lt;img src="/images/hr-image.gif" width="6" height="4" /&gt;
&lt;/td&gt; &lt;/tr&gt; 
&lt;/table&gt; 
&lt;br&gt; &lt;div align="right"&gt;     
&lt;br&gt; 
&lt;table width="100%" id='table1'  border="0" cellspacing="2" cellpadding="2"&gt;              
&lt;tr&gt;&lt;td width="40%" class="txt-label"&gt;     
&lt;SPAN CLASS="txt-label"&gt;Project ID :
&lt;/SPAN&gt;     &lt;/td&gt;
&lt;td width="60%" class="txt-lable"&gt;     
&lt;input type="text" name="projid"&gt;     
&lt;/td&gt;&lt;/tr&gt;     
&lt;tr&gt;&lt;td width="40%" class="txt-label"&gt;     
&lt;SPAN CLASS="txt-label"&gt;Project Name :&lt;/SPAN&gt;     
&lt;/td&gt;     
&lt;td width="60%" class="txt-lable"&gt;     
&lt;input type="text" name="projname"&gt;     
&lt;/td&gt;   &lt;/tr&gt;     
&lt;tr&gt;&lt;td width="40%" class="txt-label"&gt;     
&lt;SPAN CLASS="txt-label"&gt;Cost Center :
&lt;/SPAN&gt;     
&lt;/td&gt;     
&lt;td width="60%" class="txt-lable"&gt;     
&lt;input type="text" name="cost"&gt;     
&lt;/td&gt;   &lt;/tr&gt;     
&lt;tr&gt;&lt;td width="40" class="txt-label"&gt;     
&lt;SPAN CLASS="txt-label"&gt;Manager :
&lt;/SPAN&gt;     &lt;/td&gt;    
&lt;td width="60%" class="txt-lable"&gt;    
&lt;Select name="manager"&gt;
&lt;option value="" selected&gt;Select&lt;/option&gt;    
&lt;option value="Ashok"&gt;Ashok&lt;/option&gt;&lt;option value="Sathish Kumar" &gt;Sathish  Kumar&lt;/option&gt;&lt;option value="Jaya Kumar"&gt;Jaya Kumar&lt;/option&gt;&lt;option  value="Sean"&gt;Sean&lt;/option&gt;&lt;option value="Somashekar"&gt;Somashekar&lt;/option&gt;
&lt;/select&gt;    &lt;/td&gt;    &lt;/tr&gt; 
&lt;/table&gt; 
&lt;table width="100%" border="0" align="center"&gt;     
&lt;tr&gt;&lt;td&gt;     
&lt;input type="button" name="Search" value=" Search " class="button" onMouseOver=(this.className='buttonover') onMouseOut=(this.className='button') onClick="gotoSearchProjAction()"&gt;     
&lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt; 
&lt;table width="100%" id='table1'  border="0" cellspacing="2" cellpadding="2"&gt; 
&lt;tr class="tab-highlighted-2"&gt;     
&lt;td class="tab-highlighted-2" width="10%"&gt;       
&lt;div align="left"&gt;Project ID
&lt;/div&gt;     &lt;/td&gt;     
&lt;td class="tab-highlighted-2" width="10%"&gt;         
&lt;div align="left"&gt;Project Name
&lt;/div&gt;     &lt;/td&gt;     
&lt;td class="tab-highlighted-2" width="20%"&gt;       
&lt;div align="left"&gt;Cost Center
&lt;/div&gt;     &lt;/td&gt;     
&lt;td class="tab-highlighted-2" width="20%"&gt;       
&lt;div align="left"&gt;Manager&lt;/div&gt;     
&lt;/td&gt; &lt;/tr&gt; 
&lt;% int count=0; String color = "#F9EBB3"; 
if(request.getAttribute("searchList")!=null) 
{ 
ArrayList al = (ArrayList)request.getAttribute("searchList"); 
Iterator itr = al.iterator(); 
while(itr.hasNext())
{ count++; 
SearchProjVO searchList1 = (SearchProjVO)itr.next(); 
%&gt;     
&lt;tr class="bg-row1"&gt;     
&lt;td class="td-highlighted-2"&gt;     
&lt;div align="left" id="id1"&gt;&lt;a href="&lt;%=contextPath%&gt;/jsp/admin/UpdateProject.jsp?id="+&lt;%=searchList1.getProjid()%&gt;&gt;&lt;%=searchList1.getProjid()%&gt;&lt;/a&gt;&lt;/div&gt;     
&lt;/td&gt;     
&lt;td class="td-highlighted-2"&gt;     
&lt;div align="left"&gt;&lt;%=searchList1.getProjname()%&gt;&lt;/div&gt;     
&lt;/td&gt;     &lt;td class="td-highlighted-2"&gt;     
&lt;div align="left"&gt;&lt;%=searchList1.getManager()%&gt;&lt;/div&gt;     
&lt;/td&gt;     &lt;td class="td-highlighted-2"&gt;     
&lt;div align="left"&gt;&lt;%=searchList1.getCost()%&gt;&lt;/div&gt;     
&lt;/td&gt;     &lt;/tr&gt;    
&lt;% 
} } 
%&gt;  
&lt;% 
if(count==0){ 
%&gt; 
&lt;tr&gt; &lt;td colspan=8 align="center" style="background-color:eeffee"&gt;&lt;b&gt;No Record&lt;/b&gt;
&lt;/td&gt; &lt;/tr&gt; 
&lt;% 
} 
 %&gt;    
&lt;/table&gt; &lt;script src=" /js/SAFooter.js"&gt;&lt;/script&gt; 
&lt;/BODY&gt; 
&lt;/HTML&gt;
</code></pre>

<p>in updateproject.jsp i have to get the values in their corresponding text box from searchproject.jsp </p>

<pre class="prettyprint">&lt;table width="100%" id='table1'  border="0" cellspacing="2" cellpadding="2"&gt; 
&lt;tr&gt;&lt;td width="40%" class="txt-label"&gt; 
&lt;SPAN CLASS="txt-label"&gt;Project ID&lt;/SPAN&gt;
&lt;font color='red'&gt; *&lt;/font&gt;: &lt;/td&gt; 
&lt;td width="60%" class="txt-lable"&gt; 
&lt;input type="text" name="useid" value="&lt;%=request.getParameterValues("id")%&gt;" onchange="if (isNotEmpty(this))" &gt;  
&lt;/td&gt;&lt;/tr&gt;  
&lt;tr&gt;&lt;td width="40%" class="txt-label"&gt;  
&lt;SPAN CLASS="txt-label"&gt;Project Name&lt;/SPAN&gt;
&lt;font color='red'&gt; *&lt;/font&gt;:  &lt;/td&gt;  
&lt;td width="60%" class="txt-lable"&gt;  
&lt;input type="text" name="projname" onchange="if (isNotEmpty(this)) {isStr(this)}"&gt;   &lt;/td&gt;&lt;/tr&gt;  
 &lt;tr&gt;&lt;td width="40%" class="txt-label"&gt;  
 &lt;SPAN CLASS="txt-label"&gt;Cost Centre&lt;/SPAN&gt;&lt;font color='red'&gt; *&lt;/font&gt;:  
 &lt;/td&gt;  &lt;td width="60%" class="txt-lable"&gt;
</code></pre>

<p>   <input type="text" name="cost" onchange="if (isNotEmpty(this)) {isNumber(this)}">         </td></tr> <br />
    <tr><td width="40%" class="txt-label"> <br />
    &lt;SPAN CLASS="txt-label">Manager</SPAN><font color='red'> *</font>:  </td>  <td width="60%" class="txt-lable"> <br />
    &lt;Select name="manager"><option value="" selected>Select</option>  <option value="Ashok">Ashok</option><option value="Sathish Kumar" >Sathish Kumar</option><option value="Jaya Kumar">Jaya Kumar</option><option value="Sean">Sean</option><option value="Somashekar">Somashekar</option></select>  </td></tr> <br />
    </table>   </p>

<p>i am getting [Ljava.lang.String;@e793e4 in the text box. please guide me ......</p>
View Answers









Related Tutorials/Questions & Answers:
passing values between jsp file through hyperlink in div tag
passing values between jsp file through hyperlink in div tag  <... In searchproj.jsp values r retrieved from db as follows </p> <pre class...;script src="js/AdminHeader.js"&gt;&lt;/script&gt; &lt;jsp
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
Advertisements
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing values in hyperlink
passing values in hyperlink  Hi. I have given a hyperlink in one jsp page. Can i able to pass that hyperlink label as a value to the next page its navigating when the user clicks it. Plz respond me quickly. Thanks in advance
passing rs.getString values between the jsp pages using hidden fields
passing rs.getString values between the jsp pages using hidden fields  I want to pass rs.getString values from 1st.jsp to 2nd.jsp using hidden fields like <input type="hidden" value="<%=rs.getString(1
Passing value in hyperlink - JSP-Servlet
Passing value in hyperlink  How to pass value in anchor tag or HTML link from one JSP page to another JSP page ?and how to retrieve values in another...;------------------------------------read for more information.http://www.roseindia.net/jsp
passing values - JSP-Servlet
passing values  hi this is my jsp page Reserved By: Conference Hall..._DataInsertion(Name,Hallno,Time,Date,Mobileno,Status) values('"+name+"','"+hallno+"','"+time
passing data between the jsp pages ?
passing data between the jsp pages ?  i developed a project... the roll number and when we press submit button on that page it moves a jsp page .on that jsp page it retrieve marks regarding the particular roll number
how to get multiple hyperlink values from a table column to another jsp file?
how to get multiple hyperlink values from a table column to another jsp file?  dear sir: this is what i'm trying to do, i have 3 JSP files. first... i copy the hyperlink value to that third jsp file "table2", or if you have
passing values form javascript - JSP-Interview Questions
passing values form javascript  please i want to pass values from javascript function to jsp code how can i do
passing file parameter through ajax - Ajax
passing file parameter through ajax  I have file parameter in jsp file, i need to pass it to server side through ajax. how i can i do that.   Hi friend, file1.jsp passing file using jsp
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
how to pass the mutiple values from    I am getting the error when passing the values from this way emp2=${employee.lastName1} & name=${employee.firstName.How to pass the values from hyperlink in column
Passing Parameter Values to another jsp in Query Strings
Passing Parameter Values to another jsp in Query Strings  HI ALL, I m trying to pass a variable value to another JSP using query string... even though some values* stored in the variable loginid. Can any one suggest
passing the form values with image upload - JSP-Servlet
passing the form values with image upload  Hii . I want to get the solution for passing values with an image uploading form. I cant access... the values of other filds from the actual file that uploaded.Please give me
Passing values in ComboBox from XML file
Passing values in ComboBox from XML file In this tutorial we are going... tells about the MIME type and character encoding the JSP file uses...; <body> <center><H1>Passing values in COMBOBOX</h1
pass a variable(friends name) through a hyperlink in to another jsp.
pass a variable(friends name) through a hyperlink in to another jsp.  hi friends, i am developing a site in jsp. i have some problem,plz tell me the solution. problem: in the welcome page where friends name is show i write
pass a variable(friends name) through a hyperlink in to another jsp.
pass a variable(friends name) through a hyperlink in to another jsp.  hi friends, i am developing a site in jsp. i have some problem,plz tell me the solution. problem: in the welcome page where friends name is show i write
how to load flash file in any browser through jsp using NetBeans IDE without embed tag
how to load flash file in any browser through jsp using NetBeans IDE without embed tag  I am trying to load a flash file in broser from local disk using jsps.But it's not loading. I used tag like this <object id
Passing java variables from JSP to Servlet - return null values
Passing java variables from JSP to Servlet - return null values  I want to pass some variables from a JSP page to a servlet. These variables are from... from JSP to servlet gives null values. I got msg=null. Is there another way
how to pass the mutiple values from <Ui:datagrid hyperlink - JSP-Servlet
how to pass the mutiple values from      Hi Friend, Please post your full code. Thanks
Transferring values between javascript and java code in jsp - JSP-Servlet
Transferring values between javascript and java code in jsp  Is there a way to transfer values between the javascripts and the java code(scriptlet, expressions etc) in a jsp page?   Hi Friend, 1)Pass value from jsp
reading dropdown values from properties file in jsp
reading dropdown values from properties file in jsp  reading dropdown values from properties file in jsp
passing values on button click
passing values on button click  Please help me to solve this issue.I want to pass a value assigned to button to another view upon button click in xcode
Difference between class,name,id attributes in each JSP tag
Difference between class,name,id attributes in each JSP tag  Can i know the difference between class,name,id attributes in each JSP tags.................. These 3 are only used for reference ..... And what are the differernces
working of a div tag in html
working of a div tag in html   !DOCTYPE html PUBLIC "-//W3C//DTD...-color:#333399;">mghu</div> <div>Content for New Div Tag Goes... "content for new Div Tag goes here" in red block. why it is happening like
HTML div tag
HTML div tag  I have created a webpage using the div tag. The webpage has the header and the footer. the middle area is divided into left and right parts. The left side has a list of link. The right side part basically shows
HTML div tag
HTML div tag  I have created a webpage using the div tag. The webpage has the header and the footer. the middle area is divided into left and right parts. The left side has a list of link. The right side part basically shows
HTML div tag
HTML div tag  I have created a webpage using the div tag. The webpage has the header and the footer. the middle area is divided into left and right parts. The left side has a list of link. The right side part basically shows
HTML div tag
HTML div tag  I have created a webpage using the div tag. The webpage has the header and the footer. the middle area is divided into left and right parts. The left side has a list of link. The right side part basically shows
not able to get values from jsp file - JSP-Servlet
remove encrtype from form tag its work fine please go through the file...not able to get values from jsp file  hi thanks for u feedback, her am sending the file jsp and servlet but in the servlet file am not able to get
class of div tag
class of div tag  How can i recognize the selected DIV class
Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving it
Passing a 2 Dimentional Array From one Jsp to Another Jsp file and Retreving... are dynamically stored into it in one jsp file .I passed this array into another Jsp... JSP FILE 1 : // declatarion int final
To call jrxml/jasper file through jsp code in netbean
To call jrxml/jasper file through jsp code in netbean  I am making web application in jsp with netbean. For report I am using ireport 3.6.7.... my question is I want to call that jasper file through my jsp code and i also
downloading file through a file's path stored in database in jsp
downloading file through a file's path stored in database in jsp  hi want to download a file from a directory where the file location is stored... table,but i dont know hoe to download the file using its path stored
eclips hyperlink - JSP-Servlet
eclips hyperlink  In my myeclipse if hyperlink is provided in any application , it's not working when I deploy it. I also use net at my PC, is there any problem due to IP Address
Passing Parameters - JSP-Servlet
Passing Parameters  Hi I have to pass parameter like... First Name /**SECOND PAGER upto this page I passed the parameter through query string **/ Name /** I have to redirect all received params through
how to retreive values from MS Access Database based on the values entered in textbox values in jsp file
how to retreive values from MS Access Database based on the values entered in textbox values in jsp file  Hi am new to java. i need to create... a jsp file which contains a textbox, name issuedescription. when user types
Div (Ajax Tag) tag Example
Div (Ajax Tag) tag Example       In this section, you will learn about the div tag. The div tag is an Ajax... without refreshing the entire page. The div tag when used with Ajax refreshes
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing .properties file as a parameter to another function
passing .properties file as a parameter to another function  passing .properties file as a parameter to another function in an jsp file
passing from 1 jsp to another - JSP-Servlet
passing from 1 jsp to another  Hi Sir, What are the ways and means of passing from 1 jsp page to another page.what are the different types of methods?  Hi Friend, You can use tag,sedRedirect() method
Passing Parameter - JSP-Servlet
Passing Parameter  I would like to ask how to pass a parameter from javascript section into the jsp section.It will be something like...; answer<%; <---I'm stuck here passing the var
Declaring Tag Libraries In JSP
Declaring Tag Libraries In JSP   ... the <%@taglib %> directive of the JSP. This tag has some own attributes... Using all the attributes we declare the tag libraries through the <%@taglib
Passing Multi select list box values using ajax to get values to dependent list box
Passing Multi select list box values using ajax to get values to dependent list box  Hi, I have a jsp page which has 3 dependent list boxes with multiple selection. How can i pass multiple selected values through ajax to retrieve
Passing values from child window to parent window.
Passing values from child window to parent window.  Hai, I'm having... check boxes those check box values should be shown in the parent window,which will have some more values in it.The values which are selected from child window
Connecting to Database from a hyperlink in JSP - JSP-Servlet
Connecting to Database from a hyperlink in JSP  How can I connect to database by clicking on a hyperlink in a JSP Page.Can you please give me sample...://www.roseindia,net/jsp/ http://www.roweindia.net/jdbc/ Thanks.   http

Ads