- Screen name: david.rose555
david.rose555's Profile
26 Posts
42 Responses
0
Followers
Show:
- Expanded view
- List view
Private Message
- 24-Jul-2016 10:33 AM
- Forum: Using jQuery
Hello.I am trying to hide an associated 'tr' when a value in a child 'td' == "No "in the html the No string is written No For the life of me I can't figure out how to specify this in an if statement so i can hide the row.If you would like, the fiddle is here:my desperate attempts at code are as follows:HTML<table><TR><TD width=190 class=ms-formlabel noWrap vAlign=top><NOBR>Request Expedited</NOBR></TD><TD width=400 class=ms-formbody id=n17WPQ6 vAlign=top>Yes </TD></TR><TR><TD width=190 class=ms-formlabel noWrap vAlign=top><NOBR>No Request Expedited</NOBR></TD><TD width=400 class=ms-formbody id=n17WPQ6 vAlign=top>No </TD></TR><TR><TD width=190 class=ms-formlabel noWrap vAlign=top><NOBR>NoRequest Expedited</NOBR></TD><TD width=400 class=ms-formbody id=n17WPQ6 vAlign=top>No</TD></TR></table>code$(document).ready(function () {$("#startformbody").click(function(){fxmsmsformbody()alert("clicked");});//END CLICK});//END READYfunction fxmsmsformbody(){var xmsmsformbody = $(".ms-formbody");xmsmsformbody.each(function(){console.log("this_text = " + $(this).text())if($(this).text() == "No ") { //No  NOPE, IT TRIMS ???????console.log("in $(this).text = " + $(this).text());console.log("in 'No ' so HIDE this item = " + $(this).parent().text());$(this).parent().hide();}else{//console.log("in NOT ELSE'Yes '");}if($(this).text() == "No ") { //No  NOPE, IT TRIMS ???????console.log("in $(this).text = " + $(this).text());console.log("in 'No ' so HIDE this item = " + $(this).parent().text());$(this).parent().hide();}var xtrim = $(this).text();xtrim.trim();console.log(xtrim);if(xtrim == "No") { //No  NOPE, IT TRIMS ???????console.log("in $(this).text = " + $(this).text());console.log("in 'No' so HIDE this item = " + $(this).parent().text());$(this).parent().hide();}})//END EACH}//end funcHelping me to find a solution to this mess would be kindly putting me out of jQ challenged misery.sign me,"I hate SharePoint but have to work with it -dave"- Hello,I am trying to use variables when specifying an attribute value in a selector statement.so for examplevar myVariable = 985;when I use: $("tr[iid*='985']").text() she works fine.but when i try to use a variable representing the string 985 she don't.$("tr[iid*=myVariable]").text()Can anybody please help if there is a way to use variables to specify strings in this type of selector? I just don't get it.thanks -dave
- 15-Jun-2016 11:36 AM
- Forum: Using jQuery
I am having trouble getting the full string of an attribute when using IE to use jQuery in a 2010 sharePoint site.fiddle:attribute = "action" in the following. In jsfiddle it's ok but on my works website it only brings back the following:docsethomepage.aspx?ID=71485&List=b0068804-01a5-41a6-953f-b3d3e75b3619&FolderCTID=0x0120D5200022E7569C62963E469B62F73D4190A3B0080400D01D5D9D296D7B459DAB318E3E054F9C&RootFolder=%2Fsites%2Flocalresearch%2FPhoenix%2FProjectManagement%2FInitial%20Others%20PHX%20adfasWhy does the prefix "/sites/localresearch/Phoenix/ProjectManagement/Forms/Initial%20Others%20PHX/" get cut off do you think?any help is greatly appreciated -davecode:$(document).ready(function(){var str2 = $("#aspnetForm").attr("action");var str2 = str2.indexOf("Initial");alert(str2 + " str2")});full element with action attribute:<FORM name=aspnetForm id=aspnetForm action=/sites/localresearch/Phoenix/ProjectManagement/Forms/Initial%20Others%20PHX/docsethomepage.aspx?ID=71485&List=b0068804-01a5-41a6-953f-b3d3e75b3619&FolderCTID=0x0120D5200022E7569C62963E469B62F73D4190A3B0080400D01D5D9D296D7B459DAB318E3E054F9C&RootFolder=%2Fsites%2Flocalresearch%2FPhoenix%2FProjectManagement%2FInitial%20Others%20PHX%20adfas method=post oldOnSubmit="null" _initialAction="https://vaww.portal2.va.gov/sites/localresearch/Phoenix/ProjectManagement/Forms/Initial%20Others%20PHX/docsethomepage.aspx?ID=71485&List=b0068804-01a5-41a6-953f-b3d3e75b3619&FolderCTID=0x0120D5200022E7569C62963E469B62F73D4190A3B0080400D01D5D9D296D7B459DAB318E3E054F9C&RootFolder=%2Fsites%2Flocalresearch%2FPhoenix%2FProjectManagement%2FInitial%20Others%20PHX%20adfas"></FORM>- 07-Jan-2015 09:37 AM
- Forum: Getting Started
I'm trying to use jquery to change a dropdown value in SharePoint page and when the dropdown value is changed I want to fire another event. I can change the dropdown value using jquery but it does not fire the next event when it is changed. So i'm missing something. Any advice greatly appreciated.
the fiddle is here: http://jsfiddle.net/vhabhsrosed/Ljkb2574/4/
the code example:
//SET CODE TO FUNCTION WHEN ON COMMITTEE MEETING FORMS PAGE
$(document).ready(function(){var xAgenda = "Safety";
//alert("COMMITTEE = " + xAgenda);
var xCT = "Committee Action - " + xAgenda;
alert(xCT);$("SELECT[title*='Content Type']").change(function(){
alert("ive changed");
});
$("SELECT option").filter(function () { return $(this).html() == xCT; }).prop('selected', true); //USE TO CORRECT WELCOME PAGE BOUNCE BACK ISSUE?
};
}); //end readyhtml:
<SELECT id=ctl00_m_g_73ef22dd_6fe8_4ce8_94c0_1b7d874cdfff_ctl00_ctl03_ctl00_ContentTypeChoice onchange='javascript:ChangeContentType("ctl00_m_g_73ef22dd_6fe8_4ce8_94c0_1b7d874cdfff_ctl00_ctl03_ctl00_ContentTypeChoice");return false;' title="Content Type" name=ctl00$m$g_73ef22dd_6fe8_4ce8_94c0_1b7d874cdfff$ctl00$ctl03$ctl00$ContentTypeChoice> <OPTION value=0x0120D520001469F1B33983014989722309DE2BAFAC0100416798CC598C4E43903503BA4D460EF6>Committee Action - IRB</OPTION> <OPTION value=0x0120D520001469F1B33983014989722309DE2BAFAC0200EE39994BAB615D4CADD41635A918D718>Committee Action - RD</OPTION> <OPTION value=0x0120D520001469F1B33983014989722309DE2BAFAC030096FDF742BA2F8E4EBBF1DAD5C8B6384C>Committee Action - Safety</OPTION> <OPTION value=0x0120D520001469F1B33983014989722309DE2BAFAC040035D10A3E06ED814B9D835360A72FABF4>Committee Action - IACUC</OPTION> <OPTION
selected value=0x0120D52000A1B582C0DF52EB46AA1F5C53E2DC0C0201005F3A412617BB174F9E36A034814628CD>RD Initial Review</OPTION> <OPTION value=0x0120D520005AAA856F0D99404B89B2AD9529929FA1007DE53F828E3A66468322C1A2C5456BAB>IRB Initial Review Boston</OPTION> <OPTION value=0x0120D52000108E9966C7546C48B61574E1FF57AA28008A6A3A90053F364BB255FF280AD0FE56>IRB Initial Review Database</OPTION> <OPTION value=0x0120D52000108E9966C7546C48B61574E1FF57AA2802004A3E0498749C7B42994C284798BEBB42>Initial Review Human DB DEV</OPTION> <OPTION value=0x0120D52000F075F641EF75F049BD4AA6AD0A13532D00178F81E09433E84788C6E97F025243D8>Conflict of Interest Management</OPTION> <OPTION value=0x0120002834AA767DF58D48A360E9F8A05078C7>Folder</OPTION></SELECT>
- 24-Aug-2014 07:31 AM
- Forum: Using jQuery UI
JS FIDDLE HERE: http://jsfiddle.net/vhabhsrosed/jawc1uuj/I am using the datepicker and it displays the correct date in it's window but the date object has the same date but with a month prior to the date actually selected. I can't see what I am doing wrong in the code. I tried using the object.setDate "+1m" to correct but probably don't know how to do this. Can anyone see what is wrong with my code that results in this.if I dispaly10/28/2014in the datepicker window
using:var PassDate = obj.selectedYear+"-"+ obj.selectedMonth +"-"+ obj.selectedDay ;gives me9/28/2014as my variable value.Here is the code block for the datepicker i am using:$.datepicker.setDefaults({beforeShow: function(input) {$(input).css('background-color','#C5F5A2');},onSelect: function(dateText, obj) {$(this).css('background-color','');//$(this).datepicker( "setDate", "+1m" );},onClose: function(dateText, obj) {var PassDate = obj.selectedYear+"-"+ obj.selectedMonth +"-"+ obj.selectedDay ;// alert("\n\nMy New Pass Variable Date: "+ obj.selectedYear+"-"+ obj.selectedMonth +"-"+ obj.selectedDay) ;//alert("PassDate varuable= " + PassDate );$(this).css('background-color','');$("#showPassDate").text(PassDate);//THIS IS WHAT PASSES THE DATE TO THE SP SERVICE via html SO MUST HAVE FOR NOW// $( "#showPassDate" ).html( "<p><b>Meeting Date: </b></p>" + PassDate );//THIS IS WHAT PASSES THE DATE TO THE SP SERVICE via html SO MUST HAVE FOR NOW$("#xCalendarTable2").show();// NEED METHOD TO TAKE ITEM OFF AGENDA SET DATE TO BLANK},showOn: 'button',buttonText:'Show Date',dateFormat: 'DD, d MM, yy',////dateFormat: 'yyyy-MM-DD',//buttonImage:'https://myWebSite/sites/localresearch/JQUERY/img-Calendar.png',numberOfMonths: 3,showButtonPanel: true,constrainInput: true,autoSize: true,//defaultDate: nullduration: 'fast',goToCurrent: false,minDate: '-0', // The min date that can be selected, i.e. 30 days from the 'now'maxDate: '+2m +1w +1d', // The max date that can be selected, i.e. + 1 month, 1 week, and 1 days from 'now'altField: '#alternate',altFormat: 'DD, d MM, yy'});$(function() { //CODE TO VARY CAL ANIMATION$( "#datepicker" ).datepicker();$( "#datepicker" ).datepicker( "option", "showAnim", "blind" ); //CANT PUT THIS IN INSTANTIATION LIST$(".ui-datepicker-trigger").mouseover(function() {$(this).css('cursor', 'pointer');});//END MOUSEOVER doesnt work needs to be part of datepicker function});- // I'VE GOT two arrays. I want to iterate through itms in the second array to see if an item from the second arry is present in the first array. If it is present I want to effect a function ( alert("jjjj")) and then iterate to the next item and so forth. tx -davejsfiddle: http://jsfiddle.net/vhabhsrosed/4h9Ef/$(document).ready(function () {alert("wtfH");var arr1 = ["red", "blue", "green"];var arr2 = ["yellow", "blue", "black", "red", "teal", "green"];$(arr2).each(function () {//alert(this);alert(jQuery.inArray(this, arr1));if (jQuery.inArray(this, arr1) != -1) {alert("jjjj");}});}); //END READY
- 10-Jul-2014 07:56 AM
- Forum: Using jQuery
I've got two lists on a page. I want to hide items in one list when items of the same name (text) are found on a second list. I can create the arrays ok but having difficulty understanding how to use the [i] value as a variable when comparing the two arrays.The value "Application to Use Radioactive Materials" is in both arrays but my code cannot discern it. I want to hide the tr for "Application to Use Radioactive Materials" on List one because it is a hidden block of text on List two. But the return I'm getting is all items in the second list array (the 'hidden' items) rather than just a single item.it's this section here that doesn't work for me. could someone please have a look. i'm stuck:for (var i=0; i < newArr3.length; i++) {if(jQuery.inArray(i, newArr) >= -1) {$("p:contains('i')").parent().parent().hide();} else {$("#tuke").append("wNOT IN ARRAY xxxxx: " + newArr3[i]);}}********************************************************************************here is the fiddle: http://jsfiddle.net/vhabhsrosed/QG8YU/9/here is the whole block of code:// SHOW HIDE IRB CHECKLIST$(document).ready(function () {var newArr = [];var xtext = $("i");$(xtext).each(function (index) {newArr.push($(this).text())});alert("CHECKLIST ARRAY==== " + newArr);if (jQuery.inArray("Other IRB Site", newArr) != -1) {// alert("jjjj");}var newArr3 = []var newArr4 = []var xtext3 = $("A");var xParent = $("xtext3").parent().parent().parent()$(xtext3).each(function (index) {//WHY DOESN'T THIS CONDITION WORKif ($(this).parent().parent().parent().attr('style') == 'DISPLAY: none') {newArr3.push($(this).text());newArr4.push($(this).parent().parent().parent().attr('style'));}});alert("HIDDEN DOCUMENT ARRAY==== " + newArr3)for (var i=0; i < newArr3.length; i++) {if(jQuery.inArray(i, newArr) >=1) {$("#tuke").append("INARRAY " + newArr3[i]);$("p:contains('i')").parent().parent().hide();} else {$("#tuke").append("wNOT IN ARRAY xxxxx: " + newArr3[i]);}}HERE IS THE HTML:LIST ONE<div id="tuke"></div><div class=WordSection1><div align=left><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=542 style='width:406.5pt;border-collapse:collapse'><tr><td valign=bottom style='border:solid #BFBFBF 1.0pt;border-bottom:none;background:white;padding:24.0pt 16.5pt 10.5pt 16.5pt'></td></tr><tr><td valign=top style='border:solid #BFBFBF 1.0pt;border-top:none;background:white;padding:0in 0in 0in 0in'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=540 style='width:405.0pt;border-collapse:collapse'><tr><td colspan=2 style='border:none;border-bottom:solid #A6C2B2 1.0pt;padding:3.0pt 16.5pt 3.0pt 16.5pt'><p class=MsoNormal align=left style='margin-bottom:0in;margin-bottom:.0001pt;text-align:left;line-height:normal'><span style='font-size:12.0pt;color:#354D3F;text-transform:uppercase'>Submission checklist for irbstudies that enroll subjects</span></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>QUESTION</span></i></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>INSTRUCTIONS</span></i></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>Application to Use Radioactive Material</span></i></p></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><span style='font-size:10.0pt;color:black'>Uploadapproval from other site or include a cover letter with an explanation thatyou need VABHS IRB approval prior to seeking approval from other IRBs.</span></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>Abstract</span></i></p></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><span style='font-size:10.0pt;color:black'>Upload thefollowing: IND Certificate, FDA or sponsor letter, product information,e.g. Investigational Brochure, etc., written assurance form the sponsorthat the manufacture and formulation of the investigational or unlicensedtest article being used in the research conforms to federal regulations.</span></p></td></tr></table></td></tr></table></div><p class=MsoNormal> </p></div><table>LIST TWO [SHAREPOINT VERBOSITY ABBREVIATED]<TBODY><TR class="ms-alternating ms-itmhover s4-itm-selected" iid="0,15882,0" setEdgeBorder="true"><TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="Abstract " value="" type=checkbox _setup="true"></TD><TD class=ms-vb-icon><IMG title=Abstract.xml border=0 alt=Abstract.xml src="/_layouts/images/icxddoc.gif"></TD><TD class=ms-vb-title onmouseover=OnChildItem(this) height="100%"><DIV id=15882 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkFilename" CTXName="ctx0"><A onfocus=OnLink(this) onmousedown="return VerifyHref(this,event,'1','SharePoint.OpenXMLDocuments.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml')" onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','','1','SharePoint.OpenXMLDocuments.3','InfoPath.Document.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml','','1','0','0','0x7fffffffffffffff','','')" href="/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml">Abstract</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV><DIV style="LINE-HEIGHT: 22px; MARGIN: 0px; HEIGHT: 22px; TOP: 622px; LEFT: 983px" class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;" shown="false"><SPAN> </SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"><IMG style="VISIBILITY: hidden" alt="Open Menu" src="/_layouts/images/ecbarw.png" width=7 height=4></A><SPAN> </SPAN></DIV></TD><TD class=ms-vb2></TD><TD class="ms-vb2 ms-vb-lastCell">Yes</TD></TR><TR style="DISPLAY: none" class=ms-itmhover iid="0,15883,0" setEdgeBorder="true"><TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="Application to Use Radioactive Material " value="" type=checkbox _setup="true"></TD><TD class=ms-vb-icon><IMG title="Application to Use Radioactive Material.xml" border=0 alt="Application to Use Radioactive Material.xml" src="/_layouts/images/icxddoc.gif"></TD><TD class=ms-vb-title onmouseover=OnChildItem(this) height="100%"><DIV id=15883 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkFilename" CTXName="ctx0"><A onfocus=OnLink(this) onmousedown="return VerifyHref(this,event,'1','SharePoint.OpenXMLDocuments.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Application%20to%20Use%20Radioactive%20Material.xml')" onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','','1','SharePoint.OpenXMLDocuments.3','InfoPath.Document.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Application%20to%20Use%20Radioactive%20Material.xml','','1','0','0','0x7fffffffffffffff','','')" href="/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Application to Use Radioactive Material.xml">Application to Use Radioactive Material</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> </SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"></A><SPAN> </SPAN></DIV></TD><TD class=ms-vb2></TD><TD class="ms-vb2 ms-vb-lastCell">Yes</TD></TR><TR class="ms-alternating ms-itmhover" iid="0,15884,0" setEdgeBorder="true"><TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="Committee Action Boilerplate " value="" type=checkbox _setup="true"></TD><TD class=ms-vb-icon><IMG title="Committee Action Boilerplate.xml" border=0 alt="Committee Action Boilerplate.xml" src="/_layouts/images/icxddoc.gif"></TD><- 10-Jul-2014 05:52 AM
- Forum: Using jQuery
[UPDATE. CODE WORKS WHEN USED ON IE AND ON SHARPOINT AT WORK. THE ISSUE IS SEEN WHEN USING JSFIDDLE IT SEEMS]I am trying to create an array based on an attributes (style) value. but I can't seem to select this attribute to build my conditional statement in IE ( 32 or 64 bit) but I can use it successfully in Chrome. Unfortunately we can only use IE at work so I was wondering how I should write this for IE. It took me a while to realize this because I was initially building in IE and only accidentally opened the fiddle in Chrome. I'm glad this time it wasn't me, or is it?:style="DISPLAY; none"for example, if i try to use this statement all i get is undefined.$("td"[style*='DISPLAY']")I have a fiddle of this mess here:it's a bit verbose because, yes, it's the beast SharePoint I must use a my platform.here is the code I am trying hopelessly to use to get list of document names for only those 'td' who do not have style="display: none"var newArr3 = []var newArr4 = []var xtext3 = $("A");var xParent = $("xtext3").parent().parent().parent()$(xtext3).each(function (index) {//WHY DOESN'T THIS CONDITION WORKif ($(this).parent().parent().parent().attr('style') != 'DISPLAY: none') {newArr3.push($(this).text());newArr4.push($(this).parent().parent().parent().attr('style'));}});alert(newArr3)alert(newArr4)html snippet:<table><TBODY><TR class="ms-alternating ms-itmhover s4-itm-selected" iid="0,15882,0" setEdgeBorder="true"><TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="Abstract " value="" type=checkbox _setup="true"></TD><TD class=ms-vb-icon><IMG title=Abstract.xml border=0 alt=Abstract.xml src="/_layouts/images/icxddoc.gif"></TD><TD class=ms-vb-title onmouseover=OnChildItem(this) height="100%"><DIV id=15882 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff" Field="LinkFilename" CTXName="ctx0"><A onfocus=OnLink(this) onmousedown="return VerifyHref(this,event,'1','SharePoint.OpenXMLDocuments.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml')" onclick="return DispEx(this,event,'TRUE','FALSE','FALSE','','1','SharePoint.OpenXMLDocuments.3','InfoPath.Document.3','1https://vaww.portal2.va.gov/sites/localresearch/Boston/_layouts/FormServer.aspx?XmlLocation=/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml','','1','0','0','0x7fffffffffffffff','','')" href="/sites/localresearch/Boston/ProjectManagement/vhabhsrosed-10-07-2014_03-57_AM/Abstract.xml">Abstract</A><IMG class=ms-newgif title=New alt=New src="/_layouts/1033/images/new.gif"></DIV><DIV style="LINE-HEIGHT: 22px; MARGIN: 0px; HEIGHT: 22px; TOP: 622px; LEFT: 983px" class=s4-ctx onmouseover="OnChildItem(this.parentNode); return false;" shown="false"><SPAN> </SPAN><A onfocus="OnChildItem(this.parentNode.parentNode); return false;" title="Open Menu" onclick="PopMenuFromChevron(event); return false;" href="javascript:;"><IMG style="VISIBILITY: hidden" alt="Open Menu" src="/_layouts/images/ecbarw.png" width=7 height=4></A><SPAN> </SPAN></DIV></TD><TD class=ms-vb2></TD><TD class="ms-vb2 ms-vb-lastCell">Yes</TD></TR><TR style="DISPLAY: none" class=ms-itmhover iid="0,15883,0" setEdgeBorder="true"><TD class="ms-vb-itmcbx ms-vb-firstCell"><INPUT class=s4-itm-cbx title="Application to Use Radioactive Material " value="" type=checkbox _setup="true"></TD><TD class=ms-vb-icon><IMG title="Application to Use Radioactive Material.xml" border=0 alt="Application to Use Radioactive Material.xml" src="/_layouts/images/icxddoc.gif"></TD><TD class=ms-vb-title onmouseover=OnChildItem(this) height="100%"><DIV id=15883 class="ms-vb itx" onmouseover=OnItem(this) EventType="" Perm="0x7fffffffffffffff"etc.etc...txdave- I can make and array as displayed in the alert, but when i try to use inArray to identify an item in the array it doesn't see it and gives back -1. What am I missing? thank you.jsfiddle: http://jsfiddle.net/vhabhsrosed/QG8YU/jquery:$(document).ready(function () {var newArr = [];var xtext = $("i");$(xtext).each(function (index) {newArr.push($(this).text())});alert(newArr);if (jQuery.inArray("Other IRB Site", newArr) != -1) {alert("jjjj");}});html:<div class=WordSection1><div align=left><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=542 style='width:406.5pt;border-collapse:collapse'><tr><td valign=bottom style='border:solid #BFBFBF 1.0pt;border-bottom:none;background:white;padding:24.0pt 16.5pt 10.5pt 16.5pt'></td></tr><tr><td valign=top style='border:solid #BFBFBF 1.0pt;border-top:none;background:white;padding:0in 0in 0in 0in'><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=540 style='width:405.0pt;border-collapse:collapse'><tr><td colspan=2 style='border:none;border-bottom:solid #A6C2B2 1.0pt;padding:3.0pt 16.5pt 3.0pt 16.5pt'><p class=MsoNormal align=left style='margin-bottom:0in;margin-bottom:.0001pt;text-align:left;line-height:normal'><span style='font-size:12.0pt;color:#354D3F;text-transform:uppercase'>Submission checklist for irbstudies that enroll subjects</span></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>QUESTION</span></i></p></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>INSTRUCTIONS</span></i></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>OtherIRB Site</span></i></p></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><span style='font-size:10.0pt;color:black'>Uploadapproval from other site or include a cover letter with an explanation thatyou need VABHS IRB approval prior to seeking approval from other IRBs.</span></p></td></tr><tr><td valign=top style='padding:3.0pt 3.75pt 3.0pt 16.5pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><i><span style='font-size:10.0pt;color:#262626'>InvestigationalDrug</span></i></p></td><td valign=top style='padding:3.0pt 16.5pt 3.0pt 3.75pt'><p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height:normal'><span style='font-size:10.0pt;color:black'>Upload thefollowing: IND Certificate, FDA or sponsor letter, product information,e.g. Investigational Brochure, etc., written assurance form the sponsorthat the manufacture and formulation of the investigational or unlicensedtest article being used in the research conforms to federal regulations.</span></p></td></tr></table></td></tr></table></div><p class=MsoNormal> </p></div>
- //CAPTURE THE 'MIDDLE' NUMBER FROM .attr("iid") INTO AN ARRAY. So get "33803' from the .attr("iid) into an array using .each and the object $(this). I guess i'm still missing something regarding this jquery 'looping' business. if someone could please get me past this hump I'd appreciate it. thanks -dave<table><TR class=ms-itmhover id="wtf" iid="1112,33803,0" setEdgeBorder="true">wtw</TR><TR class=ms-itmhover id="wtf" iid="1112,34443,0" setEdgeBorder="true">xxx</TR><TR class=ms-itmhover id="wtf" iid="1112,31113,0" setEdgeBorder="true">yyy</TR></table>$(document).ready(function () {var arr1 = []var xiid = $("TR").attr("iid");$(xiid).each(function() {var xval = $(this).replace(/^\d{4},/,""); //DELETES PREFIXxval = $(this).replace(/\,\d{1}$/, "");//DELETES SUFFIXarr1.push(xval);alert(arr1);}); //END EACH}); //END READY
- 24-Apr-2014 05:13 PM
- Forum: Getting Started
//why can't i make this happen I want to capture the numbers 1112,33803,0
<TR class=ms-itmhover id="wtf" iid="1112,33803,0" setEdgeBorder="true">wtw</TR>
$(document).ready(function () {
var fulu = $("TR").attr("iid");
alert(fulu);
});
jsfiddle: http://jsfiddle.net/vhabhsrosed/3c5s3/
thanks for any insights. -Dave
- Hello. Trying to parse basic xml from multiple examples and not passing the bar. Here is a jsfiddle of what I thought would work when using xml that's in the html file. it doesn't. could someone please try to catch what i'm missing? thanks -davejsfiddle: http://jsfiddle.net/K3wQU/html:<p id="output">asd</p><script>$(document).ready(function(){var xml = "<RecentTutorials><Tutorial author="The Reddest"><Title>Silverlight and the Netflix API</Title><Categories><Category>Tutorials</Category><Category>Silverlight 2.0</Category><Category>Silverlight</Category><Category>C#</Category><Category>XAML</Category></Categories><Date>1/13/2009</Date></Tutorial><Tutorial author="The Hairiest"><Title>Cake PHP 4 - Saving and Validating Data</Title><Categories><Category>Tutorials</Category><Category>CakePHP</Category><Category>PHP</Category></Categories><Date>1/12/2009</Date></Tutorial><Tutorial author="The Tallest"><Title>Silverlight 2 - Using initParams</Title><Categories><Category>Tutorials</Category><Category>Silverlight 2.0</Category><Category>Silverlight</Category><Category>C#</Category><Category>HTML</Category></Categories><Date>1/6/2009</Date></Tutorial><Tutorial author="The Fattest"><Title>Controlling iTunes with AutoHotkey</Title><Categories><Category>Tutorials</Category><Category>AutoHotkey</Category></Categories><Date>12/12/2008</Date></Tutorial></RecentTutorials>",xmlDoc = $.parseXML( xml ),xmlx = $( xmlDoc ),$(xmlx).find("Tutorial").each(function(){$("#output").append($(this).attr("author") + "<br />");});});</script>
- I'm sorry but i've been struggling with how to capture the value of some text in a table. i need to select this value by first finding the string "Project Number" in a simple table and then capturing the value, in this example "1153" as a variable so I can do stuff. If someone could please help with this its much appreciated. I'm trying to use parent, next, contains, children... etc. and not getting it. -thanks Davefiddle is here: http://jsfiddle.net/vhabhsrosed/EMNGu/html:<TBODY><TR><TD vAlign=top noWrap><B class=ms-standardheader>POC</B></TD><TD width=10><TD vAlign=top></TD><TD width="10%"></TD><TR><TD vAlign=top noWrap><B class=ms-standardheader >Project Number</B></TD><TD width=10><TD vAlign=top>1153</TD><TD width="10%"></TD><TR><TD vAlign=top noWrap><B class=ms-standardheader>Study Type</B></TD><TD width=10><TD vAlign=top></TD><TD width="10%"></TD></TBODY>script:$(document).ready(function(){var text1= $("B:contains('Project Number')").parent().children:eq(2).text();alert(text1);});
- 20-Jan-2014 04:13 PM
- Forum: Using jQuery
The code below works in chrome and firefox but not in jsfiddle or IE 11. I'm not understanding why and have been able to correct it. I have a table with checkboxes in a column and want to hide/toggle rows that are unchecked. I'm using localstorage so revisiting the page remembers. thanks for any suggestions. If I leave all checkboxes blank it closes all rows appropriately but check just one box and bam, it does nothing... I think it might be this line:if (arr1.indexOf(attrText2)==-1 && $(this).closest("img [alt*='.xml']")!=-1 ){or maybe$(this).closest('tr').toggle() ;jsfiddle is here: http://jsfiddle.net/vhabhsrosed/N9WBw/// UPDATE LOCAL STORAGE WITH INFO EACH TIME A CHECKBOX IS CHECKED, THEN USE IT TO HIDE UNCHECKED TABLE ROWS$("#filter2").click(function () {// var timex=window.location.pathname;alert("path= "+timex);var arr = [];// alert("foo");localStorage.removeItem(timex);$("input:checkbox:checked").each(function () {arr.push($(this).parent().parent().parent().find('a').text());});localStorage.setItem(timex, arr);//alert("ls= "+localStorage.getItem(timex));var arr1 = localStorage.getItem(timex).split(',');//alert("arr1= "+arr1);$(".s4-itm-cbx").each(function () {var attrText2 = ($(this).parent().parent().parent().find('a').text());alert("attrTest2= "+attrText2);if (arr1.indexOf(attrText2)==-1 && $(this).closest("img [alt*='.xml']")!=-1 ){alert("pEp");$(this).closest('tr').toggle() ;}});//END EACH FUNCTION});//END .CLICK FUNTION- 10-Jan-2014 04:53 PM
- Forum: Using jQuery
I am trying to use the "not" selector to hide certain options in a dropdown box. Evidently I'm not getting it. Can someone please tell me what my misunderstanding is here. I would very much appreciate the help as I'm kind of stuck. I'm trying not to have to use the .each with arrays here because that gets complicated for me. thanks -davejsfiddle: http://jsfiddle.net/vhabhsrosed/fGj3J/<script>$(document).ready(function(){//$("option:contains('CommitteeAction')").not().hide();//$("option:not(option:not('CommitteeAction')").hide() //even tried the double negative!$("option:not(option:contains('CommitteeAction')").hide() //give me the opposite of what i'd like});</script>The dropdown html:<td valign="top" nowrap="" class="ms-formlabel">Content Type</td><td valign="top" class="ms-formbody"><select name="ctl00$m$g_4e27d02a_5beb_43bf_83d1_69d38c617ece$ctl00$ctl03$ctl00$ContentTypeChoice" title="Content Type" onchange="javascript:ChangeContentType("ctl00_m_g_4e27d02a_5beb_43bf_83d1_69d38c617ece_ctl00_ctl03_ctl00_ContentTypeChoice");return false;" id="ctl00_m_g_4e27d02a_5beb_43bf_83d1_69d38c617ece_ctl00_ctl03_ctl00_ContentTypeChoice"><option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B010085E2D9F7BC4678479F8C09308CF861A6">IRBCommitteeActionForm</option><option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B02001D86B7BFD8A63440A50FF1276ECC3BCC">IACUCCommitteeAction</option><option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B0300A1B16816E11DD445AAD8C5A8170177AC">SafetyCommitteeAction</option><option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01B0400B27BB6262B4F5446BB5BD60105D7BD5F" selected="">RDCommitteeAction</option><option value="0x0120D5200022E7569C62963E469B62F73D4190A3B003010040C514B859A5C647B73BA776CFB44A2C">IRBInitial Database Submission PHX</option> <option value="0x0120D5200022E7569C62963E469B62F73D4190A3B01902000EE375B5FE82624A8607ADAB453AA00B">IRBInitial Submission Boston</option> <option value="0x0120007192F2387B51CF4DAB8EE0C304C1FABC">Folder</option></select><br></td></tr>- 29-Dec-2013 10:49 AM
- Forum: Using jQuery
I can create the array and create individual values from it but when trying to use these values in a loop to select rows to delete it falls short for some reason. I've tried converting the array back to a string value using .join() but got that wrong too evidently. Any suggestions much appreciated. It's been a few days on this...JSFIDDLE: http://jsfiddle.net/vhabhsrosed/Txm87/7/$(document).ready(function () {var myArrayy=["IRB Mtg Date","Minutes CAF" ];//alert(myArrayy);for (var i=0;i<myArrayy.length;i++){var juju=myArrayy[i]//.join();alert(juju);$("tr:contains(juju)").hide();//$("tr:contains(IACUC Mtg Date)").hide();}});HTML:<table><tr><td width="190" valign="top" nowrap="" class="ms-formlabel"><h3 class="ms-standardheader"><nobr>IACUC Mtg Date</nobr></h3></td><td valign="top" class="ms-formbody"><!-- FieldName="Minutes CAF"FieldInternalName="Minutes_x0020_CAF"FieldType="SPFieldNote"--><span><span dir="ltr"><textarea name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" rows="6" cols="20" title="Minutes CAF" class="ms-long" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField"></textarea><input type="hidden" name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField_spSave" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_spSave"> </span></span></td></tr><tr><td width="190" valign="top" nowrap="" class="ms-formlabel"><h3 class="ms-standardheader"><nobr>IRB Mtg Date</nobr> </h3></td><td valign="top" class="ms-formbody"><!-- FieldName="Minutes CAF"FieldInternalName="Minutes_x0020_CAF"FieldType="SPFieldNote"--><span><span dir="ltr"><textarea name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" rows="6" cols="20" title="Minutes CAF" class="ms-long" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField"></textarea><input type="hidden" name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField_spSave" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_spSave"> </span></span></td></tr><tr><td width="190" valign="top" nowrap="" class="ms-formlabel"><h3 class="ms-standardheader"><nobr>Minutes CAF</nobr> </h3></td><td valign="top" class="ms-formbody"><!-- FieldName="Minutes CAF"FieldInternalName="Minutes_x0020_CAF"FieldType="SPFieldNote"--><span><span dir="ltr"><textarea name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField" rows="6" cols="20" title="Minutes CAF" class="ms-long" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField"></textarea><input type="hidden" name="ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl32$ctl00$ctl00$ctl04$ctl00$ctl00$TextField_spSave" id="ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl32_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_spSave"> </span></span></td></tr></table>- 17-Dec-2013 08:24 AM
- Forum: Using jQuery
I have narrowed the code issues down to one last spot. I can't seem to get the code rode to .hide() the table rows TR based on the localStorage values. The following code creates the localStorage and then tries to hide the TR that contain the localStorage values.full jsfiddle here: http://jsfiddle.net/vhabhsrosed/qd5kJ/thanks so much in advance for any advice. I'll keep trying to figure it out but//THIS updates LOCALSTORAGE AFTER EACH CHECKBOX CLICK. USE ON PAGE 1$(document).ready(function () {$(":checkbox").click(function () {var arr = [];$("input:checkbox:checked").each(function () {arr.push($(this).parent().parent().parent().find('nobr').text());});localStorage.setItem('key', JSON.stringify(arr));});//THIS TRIES TO GET LOCALSTORAGE FROM ABOVE AND HIDE TR ELEMENTS WHOSE A ELEMENT TEXT VALUES ARE NOT PART OF ARRAY From PAGE 1$("#filter").click(function () {var arr1 = localStorage.getItem('key')alert(arr1);$(".s4-itm-cbx").each(function () {var attrText2 = $(this).attr("title");alert(attrText2);if (jQuery.inArray(attrText2, arr1) == -1) {$(this).parent().parent().hide(); //this hides all the TR and not just those in the localStorage}});});});- 12-Dec-2013 05:54 AM
- Forum: Using jQuery
I am trying to use localStorage values created on one page to hide table rows on another page based on similar text strings. It is a sharepoint page so the html is very verbose and hard to find the correnct elements. I've set up a fiddle here to the best of my abilityI have the local storage piece working from the first page but am having trouble using it as an array to indexOf values on the second page to determine which table rows should be hidden. Lots of trouble...Here is the script I've written to try to do this. All the verbose html I left for jsfiddle because its overwhelming the woods.//THIS updates LOCALSTORAGE AFTER EACH CHECKBOX CLICK. USE ON PAGE 1$(document).ready(function () {$(":checkbox").click(function () {var arr = [];$("input:checkbox:checked").each(function () {arr.push($(this).parent().parent().parent().find('nobr').text());});localStorage.setItem("key", arr);alert("localStorage= " + localStorage.getItem("key")); // SHOWS US WHAT IS IN ARRAY});//THIS TRIES TO GET LOCALSTORAGE FROM ABOVE AND HIDE TR ELEMENTS WHOSE A ELEMENT TEXT VALUES ARE NOT PART OF ARRAY Fro PAGE 1$("#filter").click(function () {var arr1 = localStorage.getItem("key");//alert(arr1);var attrText = $(".s4-itm-cbx").attr("title");// alert(attrText);$(attrText).each(function () {if (jQuery.inArray( attrText, arr1 )==-1)$(this).parent().parent().parent(). hide();});});});- 20-Nov-2013 08:42 AM
- Forum: Using jQuery
I am having a bit of a tough time with this one.I have a fiddler of it here: http://jsfiddle.net/vhabhsrosed/XN2a2///First I want to check boxes. When I press Hide Unchecked the id's of the checked boxes are saved as an array. After the page is refreshed I want to retrieve the array and use it to recheck boxes that were checked and to automatically hide boxes that remain unchecked.//I was thinking to store and retrieve it checked id's array as a property in a SharePoint library. But once I retrieve the property I am having trouble setting up the code to check the boxes from the array and hide boxes that remain unchecked.Below is my efforts to use an array to check boxes and then hide those boxes that are not checked. Not happening. I appreciate any comments very much. -dave<!doctype html><html><head><script src="http://code.jquery.com/jquery-1.9.1.js"></script><meta charset="utf-8"><title>Untitled Document</title><script>$(document).ready(function(){$("#button1").click(function(){//SP Services to retrieve stored array and recheck boxes...var myArray="3";//this will be the array history stored in property//var myArray=["love","foo"] //CANT GET THIS TO WORKvar myVar = $("input:checkbox").not(":checked")alert(myVar);$( myVar).each( function(){if ($(this).val().indexOf(myArray)!=-1){//if((myArray).indexOf($(this).val())!=-1){$(this).attr('checked', true);var myVarHide = $("input:checkbox").not(":checked").parent().parent();$(myVarHide).hide();var arr = []; $("input:checkbox:checked").each(function(){arr.push($(this).val());});alert(arr);//SHOULD TRY LOCALSTORAGEreturn false;});}});});$("#button2").click(function(){var myVarShow = $("input:checkbox").not(":checked").parent().parent();$(myVarShow).show();});});</script>;</head><body><input name="button1" type="button" id="button1" value="Hide Unchecked and Make Array"><input type="button" name="button2" id="button2" value="Show Unchecked"><p> </p><p> </p><p> </p><form><table width="200" border="1"><tr><th scope="col"><input name="name" type="checkbox" id="a" title="title" value="valueFOO" checked></th><th scope="col"> </th><th scope="col">love</th></tr><tr><td><input type="checkbox" id="b" value="2"></td><td> </td><td>hate</td></tr><tr><td><input type="checkbox" id="c" value="3"></td><td> </td><td>foo</td></tr></table><!--THIS BLOWS UP THE CODE if enabled. I THINK ITS A JQUERY BUG?<input name="checkbox" type="checkbox" id="hiddenCheckbox" style="Display:None"; value="hiddenCheckbox">--></body></html>- 12-Nov-2013 05:29 AM
- Forum: Using jQuery
I am having a bit of trouble figuring out how to create an array of URL's filtered by checkbox siblings whose check box is checked.Then with the array of HREFs as an object I would like to open a new browser tab for each url. The HREFs I am targeting are documents so I am filtering the href attribute with a period i.e. [href*="."] so only urls of type document will be in the array. Not necessary I guess if I can figure out how to select the urls using .sibling selectors.So essentially the user would check boxes in a table next to a URL and then press a button which would open all the checked off urls in new tabs in the browser. (I tried to make a jsfiddle of this but their web site seems to be down at the moment). -thanks Dave<!doctype html><html><head><script src="http://code.jquery.com/jquery-1.9.1.js"></script><meta charset="utf-8"><title>Untitled Document</title><script>$(document).ready(function(){myArray1 = $("[HREF*='.']") //I can get all the urls but how to filter by checked checkboxes?//myArray = $(":checked").siblings(myArray1); //this didn't work for me.var arr = $.makeArray( myArray1 ); //now arr is a js array$(".s4-itm-btn").on("click",function(){for ( var i = 0; i < arr.length; i++ ) {window.location.assign( arr[ i ] ) //trying to at least open one of the URls in the array. no dice.)};});</script></head><body><input name="goforit" type="button" class="s4-itm-btn" title="goforitt" value="goforit"><table width="319" border="1"><tr><th width="20" scope="col"> </th><th width="65" scope="col"> </th><th width="93" scope="col"> </th></tr><tr><td> <input type="checkbox" class="s4-itm-cbx" checked></td><td>asdf</td><td><a href="https://vaww.portal2.va.gov/sites/localresearch/Boston/ProjectManagement/24a/Conflict%20of%20Interest%20-%20Co-PI.xml" >Conflict of Interest - Co-PI</a>;</td></tr><tr><td><input class="s4-itm-cbx" type="checkbox"></td><td>asdfas</td><td><a href="https://vaww.portal2.va.gov/sites/localresearch/Boston/ProjectManagement/24a/Abstract.xml" >Abstract</a></td></tr></table></body></html>- 17-Oct-2013 04:37 PM
- Forum: Using jQuery
I am trying to select the TR (table row) in the following table so I can .hide it. I don't get how to do that since it has no unique attributes compared to the other TR's in the table. Any help greatly appreciated -dave<html><head><script type="text/javascript" src="../Documents/DAVID/jquery/jquery-2.0.3.min.js"></script><script type="text/javascript" src="../Documents/DAVID/jquery/jquery.SPServices-2013.01/jquery.SPServices-2013.01.min.js"></script></head><body><SCRIPT type=text/javascript>SetUploadPageTitle();</SCRIPT><script>$(document).ready(function (){$('TR SPAN.ms-formvalidation').hide(); //no can do...this is a unique element text to this TR "<NOBR>Name"});</script><table width="100%" class="ms-formtable" style="margin-top: 8px;" border="0" cellSpacing="0" cellPadding="0"><TBODY><TR><TD class=ms-formlabel vAlign=top width=190 noWrap><H3 class=ms-standardheader><NOBR>Name<SPAN class=ms-formvalidation title="This is a required field."> *</SPAN></NOBR> </H3></TD><TD class=ms-formbody vAlign=top><!-- FieldName="Name"FieldInternalName="FileLeafRef"FieldType="SPFieldFile"--><SPAN><SPAN dir=ltr><INPUT id=ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl01_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_onetidIOFile class=ms-long title=Name name=ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl01$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$onetidIOFile maxLength=123 size=35 type=text></SPAN><BR></SPAN></TD></TR><TR><TD class=ms-formlabel vAlign=top width=190 noWrap><H3 class=ms-standardheader><NOBR>Project Name</NOBR> </H3></TD><TD class=ms-formbody vAlign=top><!-- FieldName="Project Name"FieldInternalName="Project_x0020_Name"FieldType="SPFieldText"--><SPAN><INPUT id=ctl00_PlaceHolderMain_idDocSetDisplayFormWebPart_ctl00_ctl02_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField class="ms-long ms-spellcheck-true" title="Project Name" name=ctl00$PlaceHolderMain$idDocSetDisplayFormWebPart$ctl00$ctl02$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField maxLength=255 type=text><BR></SPAN>Enter the formal project title </TD></TR>- 09-Oct-2013 07:16 PM
- Forum: Using jQuery
I would like to copy the integer (in this case the number "7") in the id within the string id="WebPartWPQ7" that is within the following structure of html. The element and strings in "<b class="ms-standardheader">Project
Name</b> are always present. What value of selector would allow to capture the "7" and use it as a value in a variable. Any help would be greatly appreciated. tx dave:<div allowremove="false" webpartid="4299f112-e1f2-43e3-be17-c7d5a385a46e" haspers="false" width="100%" allowdelete="false" class="noindex" id="WebPartWPQ7"><div width="100%"><h2>Blattman-E3 Ikke</h2><table style="WIDTH: 75%"><tbody><tr><td valign="top" nowrap=""><b class="ms-standardheader">ProjectName</b></td><td width="10"></td><td valign="top">E3 inihibition of IKKe signaling. </td><td width="10%"></td></tr><tr><td valign="top" nowrap=""><b class="ms-standardheader">PI</b></td><td width="10"></td><...- 08-Sep-2013 07:10 PM
- Forum: Using jQuery
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<title>Untitled Document</title>
</head><body>
//DOES ANYONE SEE WHAT I AM MISSING PLEASE. I AM WRITING THIS DIRECTLY FROM A BOOK AND I CANT GET IT TO WORK. THANKS -DAVE
<script>
$("#button").click(function(){
$(this).val("stop that");
});</script><input type="button" name="button2" id="button" value="Button">
</body>
</html>- 06-Sep-2013 08:54 PM
- Forum: Using jQuery
It's been difficult transitioning to the new Microsoft model fo teh Cloud that does not allow for custom installs of C# code and asks that we all do what we can with javascript/jquery.
Their pages are huges and complex and absolutely incomprehensible to anyone less than expert at multiple language platforms.
As such I've been having trouble placing stock JQUERY code on the page that can select items for change and events.
Does anyone have any "best practice" advice for where to place your jquery code in order for it to be heard? For exampel are there form element blocks to avoid and other traps on these gigantic page to avoid? As a newbie I'm finding it very frustrating trying to get the beautiful JQUERY to work as expected on these gigantic MS SHAREPOINT pages.
perhaps this thread will lessen the frustration for others and least of all for myself. for example. I can't get the following to kick back even the title of the page. Where does one put their code so it can be read? (src for jquery is in the header)
<script>
var title=$('title').text();
alert(title);
</script>
tx -dave
tx -dave- 06-Sep-2013 10:07 AM
- Forum: Using jQuery
for the life of me I can't seem to select the title element. What am I missisng please if you don't mind. Thank you in advance for your attention. I've tried about everything I can think of.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<meta charset="utf-8">
<title>My Title</title>
</head>
<script>
var why= $("title").txt();
alert(why);
</script>
<body>
</body>
</html>- «Prev
- Next »
Moderate user : david.rose555
© 2013 jQuery Foundation
Sponsored by
and others.