Solved

sharepoint dialog can't get jquery to select tr

Posted on 2013-05-14
3
612 Views
Last Modified: 2013-05-18
I have a tr in a SharePoint dialog.  I can view it in firebug, but when I try to use the selector in the console window, it will not select the element.

How can I use jquery to select this tr in a SharePoint dialog.

<tr id="ctl00_PlaceHolderMain_ifsSendEmail">
                  <td valign="top" class="ms-descriptiontext">

This shows 0
alert($("ctl00_PlaceHolderMain_ifsSendEmail").length);

This does nothing:
$('.ctl00_PlaceHolderMain_ifsSendEmail').hide();
0
Comment
Question by:jackjohnson44
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39165197
Notice the #
alert($("#ctl00_PlaceHolderMain_ifsSendEmail").length);

$('#ctl00_PlaceHolderMain_ifsSendEmail').hide();
0
 

Author Comment

by:jackjohnson44
ID: 39165240
Thanks, but the issue was that I was working in an iFrame.

This was the solution.

 $(".ms-dlgFrame").contents().find("#ctl00_PlaceHolderMain_ifsSendEmail").hide();
0
 

Author Comment

by:jackjohnson44
ID: 39177708
I've requested that this question be closed as follows:

Accepted answer: 0 points for jackjohnson44's comment #a39165240

for the following reason:

This was the solution.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now