Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In the Web page we have a table link, if we click on that
link all the contents under that link will be sorted
(asscending/Descending). Now i want to check in which order
the list is ? for that i need to get the data in to some var
How can i get that cells data?

Answer Posted / ganesh

To get data from table cells, u shld use innerHTML.
For that u need to give id's for all the TD's in the Table.
Try the below coding:

<script language="javascript">
function getdatas()
{
var data=document.getElementById('data6').innerHTML;
alert(data);
}
</script>
</head>

<body>
<table width="200" border="1">
<tr>
<td id="data1">ganesh</td>
<td id="data2">magesh</td>
<td id="data3">tanveer</td>
</tr>
<tr>
<td id="data4">satya</td>
<td id="data5">siddiq</td>
<td id="data6">bimal</td>
</tr>
<tr>
<td id="data7">jenson</td>
<td id="data8">nasrulla</td>
<td id="data9">dayanand</td>
</tr>
</table>
<input type="button" value="Get" onclick="getdatas()" />
</body>

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the procedure for installing USP-35 on my compure?

2071


how do invoke OS task through ANT?

2654


a="10.20.30.1" replace 1 with 45 in python using reg ex

1292


How do you insert record into scripting using siebel crm

5485


Would you tell me that what is test script? and how to write it? are there some templates?

2212


In sap script, created 1 form but when its went to production system , client want some changes in 1 (ex - addrss) window, what we will do?

1463


Need a batch file or VB script to delete old (more than 90datys) roaming profiles

2261


database acl level has manager access.his name is listed in author and Reader fields. but he didn't sea a documents what is the reason?

2270


If we add regular expressions to a script recorded in QTP, will it effect the performance of the script?

2142


why script is client dependant.

2151


Why we use Action Script(Multimedia Flash) rather than using other scripting languages (JAVA,VB...etc) ?

2764


how do u define in ur build.xml If I need to execute a task before executing my task?

2220


can I name the build.xml with any name? if so how can I invoke ?

2498


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

2635


Someone who protect my excel file, m using ms office 2007 and windows 7 operating system, pls help me, how can i unprotect sheet

2247