473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Need help in HTML input tag sorting

Hi
I need some guidance in sorting HTML input tag sorting.I am able to sort columns with out input tag and with dates.But the only problem is I am not able to sort a column which is text box with Numbers.I am using sorttable.js file which i got from website. This one is working fine with all the column but not with input tag (I mean text box where user enter Numerical value)

Regards
Raja
May 8 '07 #1
2 3173
pbmods
5,821 Expert 4TB
Heya, RajasScripts. Welcome to TSDN!

I am using sorttable.js file which i got from website.
Are you talking about this:
http://kryogenix.org/code/browser/sorttable/

I am able to sort columns with out input tag and with dates. But the only problem is I am not able to sort a column which is text box with Numbers.
Post some code, and let's look it over.
May 8 '07 #2
Thanks for the reply
I have added code in this......
Heya, RajasScripts. Welcome to TSDN!



Are you talking about this:
http://kryogenix.org/code/browser/sorttable/

yes I am talking about this sorttable.js file




Post some code, and let's look it over.
Code:

Expand|Select|Wrap|Line Numbers
  1. <%
  2.     try
  3.     {
  4.     Strng [] name = new {"abc","bca","cba"};
  5.     Strng [] contrl = new {"c1","a1","b1"};
  6.     Strng [] add = new {"z","a","b"};
  7.  
  8. %>
  9.  
  10.  
  11. <HTML>
  12. <HEAD>
  13. <TITLE>PRS3 - Account Entry</TITLE>
  14. </HEAD>
  15. <SCRIPT LANGUAGE="JavaScript" SRC="sorttable.js"></SCRIPT>
  16.  
  17. <BODY BGCOLOR="#FFFFFF" LINK="#660099" ALINK="#660099" VLINK="#660099" TOPMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" >
  18.  
  19.  
  20.     <TABLE borderColor="#111111"  height="50" cellSpacing="1"  width="1000" border="0" cellpadding="0" valign="top" bgcolor="#444444" class='sortable'>
  21.         <THEAD>
  22.         <TR bgColor="cccccc">
  23.             <th width="29" height="43">&nbsp;&nbsp;</th>
  24.  
  25.             <th width="130" height="43" style="border-style: none; border-width: medium; ">
  26.                 <b><font size="2" face="Arial, Helvetica, sans-serif"><div align="center">Number Name</font></b></div>
  27.             </th>
  28.             <th width="154" height="43" style="border-style: none; border-width: medium; ">
  29.                 <b><font face="Arial, Helvetica, sans-serif" size="2"><div align="center">Corporate/Control Codes</font></b></div>
  30.             </th>
  31.             <th width="127" height="43" style="border-style: none; border-width: medium; ">
  32.                 <b><font face="Arial, Helvetica, sans-serif" size="2"><div align="center">Address</font></b></div>
  33.             </th>
  34.  
  35.             <th width="200"  height="43"   align="center">
  36.                 <b><font face="Arial, Helvetica, sans-serif" size="2"><div align="center">Problem with this Col </font>
  37. </b></div>
  38.             </th>
  39.         </tr>
  40.         </THEAD>
  41.         <TBODY>
  42. <%        //for(int i=0;i<3;i++)
  43.         {
  44.  
  45. %>
  46.             <tr bgcolor="#FFFFFF">
  47.             <td width="29" height="43">
  48. <%
  49.  
  50.  
  51. %>
  52.                         <input type="checkbox" name="checkedValues" value="">
  53. <%
  54.  
  55. %>
  56.             &nbsp;&nbsp;</td>
  57.  
  58.             <td width="154" height="43" style="border-style: none; border-width: medium; ">
  59.                 <FONT face="Arial, Helvetica, sans-serif" size="2">abc</font>
  60.             </td>
  61.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  62.                 <FONT face="Arial, Helvetica, sans-serif" size="2">c2<br>            </font>
  63.             </td>
  64.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  65.                 <FONT face="Arial, Helvetica, sans-serif" size="2">a3<br>            </font>
  66.             </td>
  67.  
  68.  
  69.             <td   height="43">$ &nbsp;<input type="text" name="incrAGR" size="12"  maxlength="12">            </td>
  70.  
  71.         </tr>
  72. <%            }
  73.         {
  74.  
  75. %>
  76.             <tr bgcolor="#FFFFFF">
  77.             <td width="29" height="43">
  78. <%
  79.  
  80.  
  81. %>
  82.                         <input type="checkbox" name="checkedValues" value="">
  83. <%
  84.  
  85. %>
  86.             &nbsp;&nbsp;</td>
  87.  
  88.             <td width="154" height="43" style="border-style: none; border-width: medium; ">
  89.                 <FONT face="Arial, Helvetica, sans-serif" size="2">bca</font>
  90.             </td>
  91.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  92.                 <FONT face="Arial, Helvetica, sans-serif" size="2">c3<br>            </font>
  93.             </td>
  94.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  95.                 <FONT face="Arial, Helvetica, sans-serif" size="2">a1<br>            </font>
  96.             </td>
  97.  
  98.  
  99.             <td   height="43">$ &nbsp;<input type="text" name="incrAGR" size="12"  maxlength="12">            </td>
  100.  
  101.         </tr>
  102. <%            }
  103.         {
  104.  
  105. %>
  106.             <tr bgcolor="#FFFFFF">
  107.             <td width="29" height="43">
  108. <%
  109.  
  110.  
  111. %>
  112.                         <input type="checkbox" name="checkedValues" value="">
  113. <%
  114.  
  115. %>
  116.             &nbsp;&nbsp;</td>
  117.  
  118.             <td width="154" height="43" style="border-style: none; border-width: medium; ">
  119.                 <FONT face="Arial, Helvetica, sans-serif" size="2">cba</font>
  120.             </td>
  121.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  122.                 <FONT face="Arial, Helvetica, sans-serif" size="2">c1<br>            </font>
  123.             </td>
  124.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  125.                 <FONT face="Arial, Helvetica, sans-serif" size="2">a2<br>            </font>
  126.             </td>
  127.  
  128.  
  129.             <td   height="43">$ &nbsp;<input type="text" name="incrAGR" size="12"  maxlength="12">            </td>
  130.  
  131.         </tr>
  132. <%            }
  133.         {
  134.  
  135. %>
  136.             <tr bgcolor="#FFFFFF">
  137.             <td width="29" height="43">
  138. <%
  139.  
  140.  
  141. %>
  142.                         <input type="checkbox" name="checkedValues" value="">
  143. <%
  144.  
  145. %>
  146.             &nbsp;&nbsp;</td>
  147.  
  148.             <td width="154" height="43" style="border-style: none; border-width: medium; ">
  149.                 <FONT face="Arial, Helvetica, sans-serif" size="2">zx</font>
  150.             </td>
  151.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  152.                 <FONT face="Arial, Helvetica, sans-serif" size="2">c4<br>            </font>
  153.             </td>
  154.             <td width="127" height="43" style="border-style: none; border-width: medium; ">
  155.                 <FONT face="Arial, Helvetica, sans-serif" size="2">a6<br>            </font>
  156.             </td>
  157.  
  158.  
  159.             <td   height="43">$ &nbsp;<input type="text" name="incrAGR" size="12"  maxlength="12">            </td>
  160.  
  161.         </tr>
  162. <%            }
  163.  
  164. %>    </TBODY>
  165.         </TABLE>
  166.  
  167.         </TABLE>
  168.     </FORM>
  169. </BODY>
  170. </HTML>
  171. <%
  172.     }
  173. }catch(Exception t){
  174.     //out.println(t.getMessage());
  175.  
  176.  
  177. }
  178. %>
Please post code in tags - MODERATOR
May 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Al Newton | last post by:
I want to use STL's sort algorithm to sort a string vector. Some of the strings are fairly long (300 to 400 chars) and the vector isn't small (5,000 to 10,000 elements). Naturally, sorting time...
4
by: Gareth Gale | last post by:
I'm trying to implement a way of allowing a user to sort a HTML table via Javascript on the client. I've seen lots of samples where single column sorting (asc or desc) is shown, but I'd like nested...
1
by: aredo3604gif | last post by:
On Sun, 10 Apr 2005 19:46:32 GMT, aredo3604gif@yahoo.com wrote: >The user can dynamically enter and change the rule connection between >objects. The rule is a "<" and so given two objects: >a <...
8
by: hothead098 | last post by:
ASSIGNMENT (4) USING AND MANIPUPATING ARRAYS (Chapter 10 material) For this assignment you are to: 1) Create and manage arrays a) One of type integers (containing 10 elements). b) One of...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
8
by: ianaré | last post by:
Hey all, if i use a os.walk() to append files to a list like so... files = root = self.path.GetValue() # wx.TextCtrl input filter = self.fileType.GetValue().lower() # wx.TextCtrl input...
1
by: TopherB | last post by:
Hi, First let me say that my knowledge of HTML and Javascript is fairly limited. But I am stuck in a situation of trying to adapt a website's shopping cart to a new one. Here's the problem, the...
77
by: arnuld | last post by:
1st I think of creating an array of pointers of size 100 as this is the maximum input I intend to take. I can create a fixed size array but in the end I want my array to expand at run-time to fit...
1
by: arnuld | last post by:
On Mon, 29 Sep 2008 15:16:56 +0100, Ben Bacarisse wrote: An abstract overview of my own program by Ben had helped me focus on the design issue first. I came to know that whole problem went...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.