Win a copy of Learning Regular Expressions this week in the General Computing forum!

sirisha makkapati

Ranch Hand
+ Follow
since Dec 10, 2006
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 sirisha makkapati

Hi to All,

I wanted to download spec.doc file from vss through java code.
can any one give me the code,

My Vss Path=C:\Visula-SourceSafe\srcsafe.ini and file path in vss is $\Docs\spec.doc.

Thanks in advance.
10 years ago
Hi to All,

I wanted to download spec.doc folder through java code.
can any one give me the code,

My Vss Path=C:\Visula-SourceSafe\srcsafe.ini and file path in vss is $\Docs\spec.doc.

Thanks in advance.
10 years ago
Hi To All,

Can any one give me the Jsp code to extract a file(Word Document) from VSS.

Thanks in advance

Regards,
sireesha
Hi To All,

Can any one give me the Jsp code to extract a file(Word Document) from VSS.

Thanks in advance

Regards,
sireesha
Hi,

I already have the code for sorting while clicking the radio buttons as follows.

<td bgcolor="#e1e8f3" align="left">
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="1" >asc
<input type="radio" name="<%= TestCasesData.RADIO %>0" value="2" >desc
</td>



with The above line of code i could able to sort while clicking the radio buttons buti want to sort while clicking the arrow rather than clicking the radio button.


please help me,
Hi to all,

I want to aply sql order by commands to html table.

TestCase_asc=select * from mytable order by testcase asc;
TestCase_desc=select * from my tableorder by testcase desc;
user_asc=select * from mytable order by user asc;
user_desc=select * from my tableorder by user desc;


My html table:

TestCase User
test1 ANTONY
Count ZXc
Compare ABC

When user clicks on fields,Records should sort by calling above sql commands.
Any one please give me the code for this.

Thanks in advance
Hi to all,

Can any body give me regular expression for date formate
mm/dd/yyyy hh:mm:ss A.M or P.M
Hi to all,

I am having javascript for table sort which is working for static html table(where i hard coded values ),
but the same script not working for my Html table where i am getting values from java object ,can any body help.

My table is as follows:
<table border="1" width="100%" align="left" cellpadding="0" cellspacing="0" style="font: 8pt Verdana,sans-serif;">
<tr>
<td>
<table class="sortable" id="anyid" border="" width="100%" align="left" cellpadding="0" cellspacing="1" style="font: 8pt Verdana,sans-serif;">
<tr>
<td class="unsortable" bgcolor="#87a7ce" align="left"> </td>
<td class="unsortable" bgcolor="#87a7ce" align="left"> </td>
<td bgcolor="#87a7ce" align="left"><b><font size="2" face="Trebuchet MS" color="white">TestCase Name</b></td>
<td bgcolor="#87a7ce" align="left"><b><font size="2" face="Trebuchet MS" color="white">Created Date</b></td>
<td bgcolor="#87a7ce" align="left"><b><font size="2" face="Trebuchet MS" color="white">Created By</b></td>
<td class="unsortable" bgcolor="#87a7ce" align="left"> </td>
<td class="unsortable" bgcolor="#ffffff" align="center">  </td>

</tr>
<%
int counter = -1;
int valCounter = -1;
Iterator itr1 = sessionData.testCasesData.testCaseMap.keySet().iterator();
int noOfRec = sessionData.testCasesData.testCaseMap.size();
int noOfRecByTwo = noOfRec/2;
for(int i=0; i<=noOfRecByTwo;i++) {


counter++;
valCounter++;
if(counter==0){
%>
<tr>
<%
}
if (counter < 2) {
testCase = (String) itr1.next();
TestCasesData.TestCaseData testCaseData = (TestCasesData.TestCaseData) sessionData.testCasesData.testCaseMap.get(testCase);

%>
<td bgcolor="#b6cef8" align="center">
<a href="javascript:showTree(searchForm,'<%=testCase%>','TREE');" title="View Tree">
<img src="images/nolines_plus.gif" width="22" height="22" border="0" title="View Tree Versions">
</a>
</td>

<td bgcolor="#d5eaff" align="center">
<a href="javascript:showTree(searchForm,'<%=testCase%>','');" title="View Tree">
<img src="images/folderopen.gif" width="20" height="20" border="0" title="View Versions">
</a>
</td>

<td bgcolor="#b3d9ff" align="left">
<font size="2" face="Trebuchet MS" color="#0000A0">
<a href="javascript:getLatestTestCase(searchForm,'<%=testCase%>');" title="Get Latest TestCase">
<input type="hidden" name=<%= TestCasesData.VIEW_TEST_CASE %><%= valCounter %> value="<%= testCase %>"><%= testCase %>
</a>
</font>
</td>
<td bgcolor="#a8cfff" align="left"><font size="2" face="Trebuchet MS" color="#0000A0"> <%=testCaseData.createdDate%></font></td>
<td bgcolor="#bfdfff" align="left"><font size="2" face="Trebuchet MS" color="#0000A0"> <%=testCaseData.createdUser%></font></td>
<td bgcolor="#d5eaff" align="center">
<a href="javascript:deleteTestCase(searchForm,'<%=testCase%>');" title="DeleteTestCase"><img src="images/delete.gif" width="20" height="20" border="0" title="Delete TestCase">
</a>
</td>
<%
if (counter < 1) {
}
if (!(itr1.hasNext())) {
while (counter < 1) {
%>

counter++;
}
}
%>
<%

} else {
counter = -1;

%>

</tr>
<%
}
}

%>

</table>

My script
<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/
function zxcES(zxcele,zxcstyle,zxcp,zxctxt){
if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
for (key1 in zxcstyle){
document.Show.Show1.value=key1;

zxcele.style[key1]=zxcstyle[key1]; }

if (zxcp){ zxcp.appendChild(zxcele); }
if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
return zxcele;
}
function zxcMonth(zxcm){
var zxcmonths={jan:'01',feb:'02',mar:'03',apr:'04',may:'05',jun:'06',jul:'07',aug:'08',sep:'09',nov:'11',dec:'12'};
for (key1 in zxcmonths){
if (key1==zxcm) return zxcmonths[key1];
}
}


function zxcSortTable(zxcid,zxccnus,zxctype){
zxctype=zxctype||'std';
//zxcES('DIV',{'width':'0px'});
var zxcargs=zxcSortTable.arguments
var zxctable=document.getElementById(zxcid);
var zxcrows=zxctable.rows,zxcscells=[],zxcclones=[],zxcblanks=[],zxccnt=0;
var zxcmonths={jan:'01',feb:'02',mar:'03',apr:'04',may:'05',jun:'06',jul:'07',aug:'08',sep:'09',nov:'11',dec:'12'};
for (var zxc0=0;zxc0<zxccnus.length;zxc0++){
for (var zxc0a=1;zxc0a<zxcrows.length;zxc0a++){
var zxccells=zxcrows[zxc0a].cells;
zxcscells.push(zxccells[zxccnus[zxc0]]);
var zxcdata=zxccells[zxccnus[zxc0]].firstChild.data;
if (/[a-z]|[0-9]/i.test(zxcdata)){
zxcclones[zxccnt]=(zxccells[zxccnus[zxc0]].cloneNode(true));
if (zxctype=='dd/mm/yyyy'||zxctype=='mm/dd/yyyy'||zxctype=='dd/mmm/yyyy'||zxctype=='mmm/dd/yyyy'){
var zxcsep=zxcdata.charAt(zxcdata.length-5);
zxcdata=zxcdata=zxcdata.split(zxcsep)[2]+((zxctype.match('mmm'))?zxcmonths[zxcdata.split(zxcsep)[(zxctype=='dd/mmm/yyyy')?1:0].toLowerCase().substring(0,3)]:zxcdata.split(zxcsep)[(zxctype.charAt(0)=='m')?0:1])+(zxcdata.split(zxcsep)[(zxctype.charAt(0)=='d')?0:1]);//zxcdata.split(zxcsep).reverse().join('');
}
zxcclones[zxccnt++].data=zxcdata;
}
else zxcblanks.push(zxccells[zxccnus[zxc0]].cloneNode(true));
}
}
if (!zxcrows[0].cells[zxccnus[0]].ud) zxcrows[0].cells[zxccnus[0]].ud='Up';
zxcrows[0].cells[zxccnus[0]].ud=(zxcrows[0].cells[zxccnus[0]].ud=='Up')?'Down':'Up';
zxcclones=zxcclones.sort(zxcSortTxt);
if (zxcrows[0].cells[zxccnus[0]].ud=='Up') zxcclones=zxcclones.reverse();
zxcclones=zxcclones.concat(zxcblanks);
for (var zxc1=0;zxc1<zxcclones.length;zxc1++) zxcscells[zxc1].parentNode.replaceChild(zxcclones[zxc1],zxcscells[zxc1]);
for (var zxc2=0;zxc2<zxccnus.length;zxc2++) zxcrows[0].cells[zxccnus[zxc2]].getElementsByTagName('IMG')[0].src=(zxcrows[0].cells[zxccnus[0]].ud=='Up')?'http://www.vicsjavascripts.org.uk/StdImages/down[1].gif':'http://www.vicsjavascripts.org.uk/StdImages/up[1].gif';
}

function zxcSortTxt(zxca,zxcb){
var zxcaa=zxca.data;
var zxcbb=zxcb.data;
if (zxcaa>zxcbb) return 1;
if (zxcaa<zxcbb) return -1;
return 0;
}
can any body help
10 years ago
JSP
Hello friends,
I am doing table sorting with javascript.
I wanted to sort date fields.
can any body give me an idea how to add code to sort date fields to my scipt.

My script is as follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>


Thanks in advance.

<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/

function zxcSortTable(zxcid,zxccnus){
var zxcargs=zxcSortTable.arguments
var zxctable=document.getElementById(zxcid);
var zxcrows=zxctable.rows,zxcscells=[],zxcclones=[],zxcblanks=[],zxccnt=0;
for (var zxc0=1;zxc0<zxcargs.length;zxc0++){
for (var zxc0a=1;zxc0a<zxcrows.length;zxc0a++){
var zxccells=zxcrows[zxc0a].cells;
zxcscells.push(zxccells[zxcargs[zxc0]]);
var zxcdata=zxccells[zxcargs[zxc0]].firstChild.data;
if (/[a-z]|[0-9]/i.test(zxcdata)){
zxcclones[zxccnt]=(zxccells[zxcargs[zxc0]].cloneNode(true));
zxcclones[zxccnt++].data=zxcdata;
}
else{
zxcblanks.push(zxccells[zxcargs[zxc0]].cloneNode(true));
}
}
}
if (!zxcrows[0].cells[zxcargs[1]].ud) zxcrows[0].cells[zxcargs[1]].ud='Up';
zxcrows[0].cells[zxcargs[1]].ud=(zxcrows[0].cells[zxcargs[1]].ud=='Up')?'Down':'Up';
zxcclones=zxcclones.sort(zxcSortTxt);
zxcclones=zxcclones.sort(zxcSortTxt);
if (zxcrows[0].cells[zxcargs[1]].ud=='Up') zxcclones=zxcclones.reverse();
zxcclones=zxcclones.concat(zxcblanks);
for (var zxc1=0;zxc1<zxcclones.length;zxc1++){
zxcscells[zxc1].parentNode.replaceChild(zxcclones[zxc1],zxcscells[zxc1]);
}
for (var zxc2=1;zxc2<zxcargs.length;zxc2++){
zxcrows[0].cells[zxcargs[zxc2]].getElementsByTagName('IMG')[0].src=(zxcrows[0].cells[zxcargs[1]].ud=='Up')?'http://www.vicsjavascripts.org.uk/StdImages/down[1].gif':'http://www.vicsjavascripts.org.uk/StdImages/up[1].gif';
}
}

function zxcSortTxt(zxca,zxcb){
var zxcaa=zxca.firstChild.data;
var zxcbb=zxcb.firstChild.data;
if (zxcaa>zxcbb) return 1;
if (zxcaa<zxcbb) return -1;
return 0;
}
/*]]>*/
</script>
</head>


Thanks in advance.
Hi to all,

I wanted add up && down icons to my theads,while sorting
my code is as follows.for ascending up arow,for descending down arow like that.
my code is as follows

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title></title>

<script language="JavaScript" type="text/javascript">
/*<![CDATA[*/

function zxcSortTable(zxcid,zxccnus){
var zxcargs=zxcSortTable.arguments
var zxctable=document.getElementById(zxcid);
var zxcrows=zxctable.rows,zxcscells=[],zxcclones=[],zxcblanks=[],zxccnt=0;
for (var zxc0=1;zxc0<zxcargs.length;zxc0++){
for (var zxc0a=1;zxc0a<zxcrows.length;zxc0a++){
var zxccells=zxcrows[zxc0a].cells;
zxcscells.push(zxccells[zxcargs[zxc0]]);
var zxcdata=zxccells[zxcargs[zxc0]].firstChild.data;
if (/[a-z]|[0-9]/i.test(zxcdata)){
zxcclones[zxccnt]=(zxccells[zxcargs[zxc0]].cloneNode(true));
zxcclones[zxccnt++].data=zxcdata;
}
else{
zxcblanks.push(zxccells[zxcargs[zxc0]].cloneNode(true));
}
}
}
if (!zxcrows[0].cells[zxcargs[1]].ud) zxcrows[0].cells[zxcargs[1]].ud='Up';
zxcrows[0].cells[zxcargs[1]].ud=(zxcrows[0].cells[zxcargs[1]].ud=='Up')?'Down':'Up';
zxcclones=zxcclones.sort(zxcSortTxt);
if (zxcrows[0].cells[zxcargs[1]].ud=='Up') zxcclones=zxcclones.reverse();
zxcclones=zxcclones.concat(zxcblanks);
for (var zxc1=0;zxc1<zxcclones.length;zxc1++){
zxcscells[zxc1].parentNode.replaceChild(zxcclones[zxc1],zxcscells[zxc1]);
}
}

function zxcSortTxt(zxca,zxcb){
var zxcaa=zxca.firstChild.data;
var zxcbb=zxcb.firstChild.data;
if (zxcaa>zxcbb) return 1;
if (zxcaa<zxcbb) return -1;
return 0;
}

/*]]>*/
</script>

any one please help me.
Hi To all,

I am having two html tables,I wanted to merge records from these two tables and i want to sort the records.

for example i am 50 records in first table and 50 records in another table.i want merge 100 records and sort them.again after sorting first 50 records should be in first table and another 50 records should be in another table.

I am using javascript from the following link to sort
http://www.kryogenix.org/code/browser/sorttable/

any one please give me the code.
Thank you very much lave,its working.
10 years ago
JSP
Hi to all,

I am having a html table in my jsp with n number of records.i wanted to devide this table into two tables and i wanted to display first n/2 records in first table and next n/2 records in second table.
My records are atored in HashMap.

any one please give me the code for this
10 years ago
JSP
Hi to all,
I am sorting html table.
any one please give me the code to handle blank rows,i.e i want to sort only non empty rows.

Thanks in advance
Hi to all,
My table like this

empno ename
-----------
1 fork
2 John

I am having a Html table,I wanted to delete last row of the table.
I want to delete last row.

any one please help me

thanks in advance