I have a javascript that captures data from a highlighted row in a table and then sends this data in url to the next jsp page. The code works fine for a highlighted row that has one integer (id) column and a date column. However, i have another requirement similar where instead of the id I have to get a String a (name) column with a date. Im putting up the code, really appreciate if you can respond asap have a deadline in a day!!!! thanks
.c1 {background-color: #a6c4d4;}
.c2 {background-color: #a6c4d4;}
.c3 {background-color: #68C2EF;}
function ov(i){
document.getElementById(i).className="c3";
}
function ot(i,c){
document.getElementById(i).className=c;
}
function click(ide,d1,d2,d3){
var st=new String(d3);
if(st.length==1){
d3="0"+d3;
var d=d1+"-"+d2+"-"+d3;
alert("Editing Patient Data with ID: " +ide)
window.location.replace('http://localhost:8080/Medicare/visit_edit.jsp?id='+ide+'&&dd='+d,'mywindow','width=500, height=350,toolbar=no,resizable=yes,menubar=yes');
}
else{
var d=d1+"-"+d2+"-"+d3;
alert("Editing Patient Data with ID: " +ide)
window.location.replace('http://localhost:8080/Medicare/visit_edit.jsp?id='+ide+'&&dd='+d,'mywindow','width=500, height=350,toolbar=no,resizable=yes,menubar=yes');
}
}
AND MY Table looks like this
%>
<tr id=<%=rs.getString("med_date")%> class=c1 onclick='click(<%=rs.getString("medicine")%>)' onmouseover='ov("<%=rs.getString("med_date")%>")' onmouseout='ot("<%=rs.getString("med_date")%>","c1")'>
<td> <font face="Helvetica" size="1" color="#000000"><%=rs.getString("med_date")%></font></td>
<td> <font face="Helvetica" size="1" color="#000000"><%=rs.getString("fname")%></font></td>
<td> <font face="Helvetica" size="1" color="#000000"><%=rs.getString("lname")%></font></td>
</tr>
<%
you see medicine is a character column..for some reason, im not able to capture the character type and carry it over to the next page.