Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599169

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:20:06+00:00 2026-06-12T01:20:06+00:00

I have a set of connected web part on a page. Basically these are

  • 0

I have a set of connected web part on a page. Basically these are out of the box webparts and are connected. The provider and consumer are connected on the user name field (donmain\userName). So selecting a value from the provider webpart updates all the consumer web parts data.

Now my question, I would like to get the selected item from the webpart, the selected item has a “img” tag whose “alt” text is “Selected” so based on this I would like to get the selected text of the next elemet.

This is my Mark UP and from the markup I would like the value”domain\test.officer” returned as it is the selected item.

            <TABLE id={2E5002B0-EDC3-4541-A0ED-2A81797B459C}-{F1162455-D63E-481D-B13C-C1A4A59E5A34} class=ms-listviewtable border=0 cellSpacing=0 summary="Trainee " cellPadding=1 width="100%" xmlns:o="urn:schemas-microsoft-com:office:office" o:WebQuerySourceHref="http://test.app.domain.net/test/_vti_bin/owssvr.dll?CS=65001&amp;XMLDATA=1&amp;RowLimit=0&amp;View={F1162455-D63E-481D-B13C-C1A4A59E5A34}" handleDeleteInit="true"><TBODY>
            <TR class="ms-viewheadertr ms-vhltr" vAlign=top>
            <TH class=ms-vh-icon scope=col><INPUT class=s4-selectAllCbx title="Select or deselect all items" onclick=ToggleAllItems(event,this,159) value="" type=checkbox></TH>
            <TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
            <DIV class=ms-vh-div name="SelectTitle" SortFields="View={f1162455-d63e-481d-b13c-c1a4a59e5a34}&amp;SortField=SelectTitle&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Select" CTXNum="159" FilterDisableMessage="" Filterable="FALSE" FilterDisable="" SortDisable="" Sortable="FALSE">Select</DIV></TH>
            <TH class=ms-vh-icon onmouseover=OnChildColumn(this) scope=col noWrap>
            <DIV class=ms-vh-div name="Attachments" SortFields="View={f1162455-d63e-481d-b13c-c1a4a59e5a34}&amp;SortField=Attachments&amp;SortDir=Asc" ResultType="" FieldType="Attachments" DisplayName="Attachments" CTXNum="159" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortAttachments onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={f1162455-d63e-481d-b13c-c1a4a59e5a34}&amp;SortField=Attachments&amp;SortDir=Asc"><IMG border=0 src="/_layouts/images/attachhd.gif"><IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
            <DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH>
            <TH class=ms-vh2 onmouseover=OnChildColumn(this) scope=col noWrap>
            <DIV class=ms-vh-div name="LinkTitle" SortFields="View={f1162455-d63e-481d-b13c-c1a4a59e5a34}&amp;SortField=LinkTitle&amp;SortDir=Asc" ResultType="" FieldType="Computed" DisplayName="Title" CTXNum="159" FilterDisableMessage="" Filterable="" FilterDisable="" SortDisable="" Sortable=""><A id=diidSortLinkTitle onfocus=OnFocusFilter(this) onclick="javascript:return OnClickFilter(this,event);" href="javascript: " SortingFields="View={f1162455-d63e-481d-b13c-c1a4a59e5a34}&amp;SortField=LinkTitle&amp;SortDir=Asc">Title<IMG class=ms-hidden border=0 alt="Use SHIFT+ENTER to open the menu (new window)." src="/_layouts/images/blank.gif" width=1 height=1></A><IMG border=0 alt="" src="/_layouts/images/blank.gif"><IMG border=0 alt="" src="/_layouts/images/blank.gif"></DIV>
            <DIV class=s4-ctx><SPAN>&nbsp;</SPAN><A onfocus="OnChildColumn(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TH></TR>
            <TR class=ms-itmhover iid="159,9,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\test.user1&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><IMG style="CURSOR: hand" border=0 alt=Selected align=absMiddle src="/_layouts/images/rbsel.gif"></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=9 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=9&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\test.user1</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR>
            <TR class="ms-alternating ms-itmhover" iid="159,8,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\test.officer&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><A onclick="SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','8');return false;" href="javascript:SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','8');return false;" target=_self><IMG style="CURSOR: hand" border=0 alt=Normal align=absMiddle src="/_layouts/images/rbunsel.gif"></A></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=8 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=8&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\test.officer</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR>
            <TR class=ms-itmhover iid="159,5,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\n.test&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><A onclick="SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','5');return false;" href="javascript:SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','5');return false;" target=_self><IMG style="CURSOR: hand" border=0 alt=Normal align=absMiddle src="/_layouts/images/rbunsel.gif"></A></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=5 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=5&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\n.test</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR>
            <TR class="ms-alternating ms-itmhover" iid="159,3,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\test1.user1&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><A onclick="SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','3');return false;" href="javascript:SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','3');return false;" target=_self><IMG style="CURSOR: hand" border=0 alt=Normal align=absMiddle src="/_layouts/images/rbunsel.gif"></A></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=3 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=3&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\test1.user1</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR>
            <TR class=ms-itmhover iid="159,2,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\admin.user&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><A onclick="SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','2');return false;" href="javascript:SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','2');return false;" target=_self><IMG style="CURSOR: hand" border=0 alt=Normal align=absMiddle src="/_layouts/images/rbunsel.gif"></A></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=2 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=2&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\admin.user</A></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR>
            <TR class="ms-alternating ms-itmhover" iid="159,1,0" setEdgeBorder="true">
            <TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="domain\portal.user&#13;&#10;  " value="" type=checkbox _setup="true"></TD>
            <TD class=ms-vb2><A onclick="SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','1');return false;" href="javascript:SelectField('{F1162455-D63E-481D-B13C-C1A4A59E5A34}','1');return false;" target=_self><IMG style="CURSOR: hand" border=0 alt=Normal align=absMiddle src="/_layouts/images/rbunsel.gif"></A></TD>
            <TD class=ms-vb2></TD>
            <TD class="ms-vb-title ms-vb-lastCell" onmouseover=OnChildItem(this) height="100%">
            <DIV id=1 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkTitle" CTXName="ctx159"><A onfocus=OnLink(this) onclick="EditLink2(this,159);return false;" href="http://test.app.domain.net/test/_layouts/listform.aspx?PageType=4&amp;ListId={2E5002B0-EDC3-4541-A0ED-2A81797B459C}&amp;ID=1&amp;ContentTypeID=0x0100801F054C4E00C243A9A49EC13FF778D7003293EF8DE37E144BAA8A5296D5E6CA8B" target=_self>domain\portal.user</A></DIV>
            <DIV class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;"><SPAN>&nbsp;</SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN>&nbsp;</SPAN></DIV></TD></TR></TBODY></TABLE>
  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:20:07+00:00Added an answer on June 12, 2026 at 1:20 am

    You can use SharePoint 2010 Client Object Model method “SP.ListOperation.Selection.getSelectedItems()” to obtain the selected items.

    Try this script in Content Editor Webpart:

    <script type="text/javascript">
    
     function ShowSelectedItems() {
      var ctx = SP.ClientContext.get_current();
      var selectedItems = SP.ListOperation.Selection.getSelectedItems(ctx);
      var key;
      for (key in selectedItems) {
       alert(selectedItems[key].id);
      }
    
    
     }</script>
     <input name="btnShowSelectedItems" id="btnShowSelectedItems" onclick="ShowSelectedItems();" type="button" value="Show Selected Items"/> 
    

    I will not recommend this, but if you really wanna go jQuery with this you can probably try this script:

    var selectedImg$ = $('img[alt^="Selected"]');
    var elemID = selectedImg$.closest('tr').attr('iid').split(',')[1];
    var linkText = selectedImg$.closest('tr').find('div#'+elemID).find('a').text();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of WCF web services connected to dynamically by a desktop
I have set a background on the data-role=page element like so <div data-role=page style=background:
I have a set of nodes, each of which is connected to at least
I'm working on a web app connected to oracle. We have a table in
I have a web application with HTML / jQuery which ic connected with AJAX
I have a set of tables which are connected through foreign keys , and
I have a custom web part that I am working on that has an
I have a code base web application that is connected to 2 databases. Depending
I have a set of webservices that I connect to using Silverlight Client. I
I have set the eclipse java formatter to wrap lines that exceed 120 characters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.