Fetch the id from the select tag inside the table tr td in javascript
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fetch the id from the select tag inside the table tr td in javascript
Can you please help me in fetching the id and token id from the below select tag
<table>
<tbody>
<tr>
<td>
<select tabindex="-1" id="c2bed32656751f63620b" aria-hidden="true" tokenid="1a4a9ea8-2043-4447-9634-de03fca5fb26">
<option value="">Actions</option>
<option value="documents">Documents</option>
<option value="continue">Edit </option>
</select>
<span class="select2 select2-container select2-container--bootstrap js-dropdown-actions-template js-dropdown-actions js-dropdown-actions-events" id="s2id_c2bed326-2233-4642-b046-56751f63620b" dir="ltr">
</td>
</tr>
<tr>
<td>
<select id="xxx" tokenid="xxx">
</td>
</tr>
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @vsubbu,
I would suggest that you treat your HTML as XML. In this case, you can use XPAth to easily get the needed attribute. Please refer to the following article for more information:
Community, your suggestions?
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
