Gopalkrishna prasad

Greenhorn
+ Follow
since Aug 26, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gopalkrishna prasad

Maneesh Godbole wrote:

first image is showing cloning of rows


You need to upload the image to some image hosting site which is publicly accessible and then provide the link. I usually use dropbox. You might have some other preference.



http://www.quora.com/JavaScript/What-is-the-solution-to-get-the-values-of-text-boxes-in-the-cloned-rows-having-same-name-and-insert-into-the-database-using-jsp-and-servlet
please find the above link..
hi,
1)i have a table "maintable"
2)inside "maintable" i have 3 rows calles "row1" "row2" "row3".
3)in "row1" i have [+] and[-] button to add and delete respectively, when i click [+] "row1" "row2" "row3" should add at once, and same for [-] to delete.
4) and also i have "Address Seq Num " in "row1" the value of this should be 1,2,3..like serial number for the sucessive additon of rows.

5)and in "row3" i have table called "innertable" ,inside this it has body called "innerbody" inside this it has a row called "innerrow" this "innerrow also had [+][-] buttons.
6)this "innerrow" should be added when [+] is clicked and shluld be deleted when [-] button clicked.
please help me..i'm strucked in this...




http://www.quora.com/JavaScript/What-is-the-solution-to-get-the-values-of-text-boxes-in-the-cloned-rows-having-same-name-and-insert-into-the-database-using-jsp-and-servlet

for images please find the above link

here i'm doing clone of rows...
first image is showing cloning of rows

1)first address seq number wiil be 1, and user will enter effective date and effective status...

2)when user click [+] the next row will comes with auto increment of address seq num=2... and user will enter rest of the fields...

3)my problem is...how can i insert the subsequent "address seq number" , "effective date" and "effective status" to subsequent rows in the database table as i shown in the below....

consider this image as a table in database
--------------------------------------------------------
|address seq num|effective date|effective status|
--------------------------------------------------------
|1.......................|08/08/2013...|active.............|
--------------------------------------------------------
|2.......................|09/08/2013...|active.............|
-------------------------------------------------
|3.......................|10/08/2013...|active.............|
--------------------------------------------------------

----------------------------------


1)here i'm doing clone of a row...but this code is working only in eclipse [ ie ,cloning is working ] and it is also not working in anybrowsers.
if i write
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "Page on W3">
to this code ,it will not work in eclipse also.....

2)i have servlet code to get only single value from jsp

String address_seq_num=request.getParameter("address_seq_num");
String effdt =request.getParameter("effdt");
String eff_status =request.getParameter("eff_status");

how can i get the value of address seq number in the cloned row fromjsp to servlet to insert into the next row of a table in the database.
please guide me...
----------------------------------------------------------
the code is here
hi guys...
1)i have a table called "main_table", in this table , i have table_body called "table_body"
2)in this table body i have table row called "table_row_clone" which i want to add and remove when a [+] and [-] clicked.
3)adding and removing of row is working....but my problem is,,,
i'm not able to increment the value of "ADDRESS SEQ NUM" in the "CLONED ROW"...I tried but not working..
please guide me guys....



<html>
<head>
<script>
function clonetable()
{

var row = document.getElementById("table_row_clone"); // find row to copy
var table = document.getElementById("table_body"); // find table to append to
var clone = row.cloneNode(true); // copy children too
clone.id = "abc"; // change id or other attributes/contents
table.appendChild(clone); // add new row to end of table
}

function deltable()
{
var x=document.getElementById("main_table"); //get the table
var rowCount = x.rows.length;

if(rowCount>1)
{
x.deleteRow(rowCount-1);
}//delete the last row
}


</script>

</head>
<body>
<table id="main_table" align="center" style="width:75%" >

<tbody id="table_body">
<tr id="table_row_clone">
<td>
<table align="center" style="width:100%" >

<tr >
<td align="center">
<div style="border:3px solid silver;border-radius:5px;background-color:grey">
<table width="100%" >
<tr>
<th align="center" >
Address Details
</th>
</tr>
</table>
</div>
</td>
</tr>

<tr>
<td>
<div style="border:3px solid silver;border-radius:5px;background-color:#1E90FF">
<table align="center" style="width:99%">
<tr style="background-color:#1E90FF">

<td style="width:35%">
<table width="100%">
<tr id="slrow">
<td style="width:43%">
Address Seq Num
</td>
<td>
<input id="asn"style="width:60px" name="address_seq_num" type="text" value="1" readonly>
</td>
</tr>
</table>
</td>

<td width="49%" align="right" >
<input style="width:80%" type="text" value="Reg.office/Primary Office">
</td>

<td align="right">
<input style="width:30px" type="button" value="+" onclick="clonetable()">
<input style="width:30px" type="button" value="-" onclick="deltable()">
</td>
</tr>
</table>
</div>
</td>
</tr>

<tr>
<td>
<div style="border:3px solid silver;border-radius:5px;background-color:#1E90FF">
<table align="center" style="width:99%" >
<tr >

<td align="left" style="width:50%">
<table width="100%">
<tr>
<td style="width:30%">
Effective Date
</td>
<td style="width:70%" >
<input style="background-color:white;width:44.5%" name="effdt" type="text" class="tcal">
</td>
</tr>
</table>
<td style="width:50%">
<table width="100%" >
<tr>
<td align="right">
Effective Status
</td>
<td style="width:45%">
<select name="eff_status" name="eff_status" style="float:right;width:145px" id="estatus">

<option value="Active" selected>Active</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>

</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>