I'm using jQuery with SharePoint 2013, and have to get the table Id to add an attribute. The table Id is   {44C80A95-F3E4-40DA-9A97-50CADFFFED61}-{DD02CEA7-CC2B-4E4A-A725-86E82C6D11FC}   When I use:  jQuery("#{44C80A95-F3E4-40DA-9A97-50CADFFFED61}-{DD02CEA7-CC2B-4E4A-A725-86E82C6D11FC}").attr("width","100%");   It gives me this erro:  Uncaught Error: Syntax error, unrecognized expression: #{44C80A95-F3E4-40DA-9A97-50CADFFFED61}-{DD02CEA7-CC2B-4E4A-A725-86E82C6D11FC}    The problem is with the "{".  How to solve this problem?
14915
When creating the id attributes for HTML elements, what rules are there for the value?
34708
In SharePoint how do you get the ID value from the url of the page you are on using javascript( Jquery,ajax, Rest..),  e.g. I have the url like so: http:// ddd/mypage?ID=xx   I tried before to retrieve the full url but it didn't get the ID and its value. so I have to get the ID value directly with the get method
105734
In my web app, I submit some form fields with jQuery's $.getJSON() method. I am having some problems with the encoding. The character-set of my app is charset=ISO-8859-1, but I think these fields are submitted with UTF-8.   How I can set encoding used in $.getJSON calls?
1582
I have a &lt;lightning:recordViewForm in a custom lightning component.  When I hardcode the recordId attribute it works, but when I pass an attribute in it fails without any error messages in either the console or the debug log.  Component  &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}" /&gt; &lt;aura:attribute name="recordId" type="Id"&gt;&lt;/aura:attribute&gt;  &lt;lightning:recordViewForm recordId="{! v.recordId }" objectApiName="MyCustomObject__c"&gt;      &lt;lightning:outputField fieldName="Name" /&gt;  &lt;/lightning:recordViewForm&gt;   JavaScript Controller  doInit : function(cmp, event, helper) {      // var recordId = helper.getQueryStringParameter('recordId');      cmp.set("v.recordId", "a0C4E000003YMkmUAG"); }   The above does not work, even if I put the recordId directly into the attribute.  It only works when I set the Id in the recordId attribute of the &lt;lightning:recordViewForm like below:  &lt;lightning:recordViewForm recordId="a0C4E000003YMkmUAG" objectApiName="MyCustomObject__c"&gt;      &lt;lightning:outputField fieldName="Name" /&gt;  &lt;/lightning:recordViewForm&gt;
621
How to Handle Dynamic Changing IDs In XPath? for example :   //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1]   In this xpath id "3647323225296998740" is changing every time when reloading the page.   Is there any way to handle this type of situation in Selenium?
15587
I have a query to insert a row into a table, which has a field called ID, which is populated using an AUTO_INCREMENT on the column. I need to get this value for the next bit of functionality, but when I run the following, it always returns 0 even though the actual value is not 0:  MySqlCommand comm = connect.CreateCommand(); comm.CommandText = insertInvoice; comm.CommandText += "\'" + invoiceDate.ToString("yyyy:MM:dd hh:mm:ss") + "\', " + bookFee + ", " + adminFee + ", " + totalFee + ", " + customerID +  ")"; int id = Convert.ToInt32(comm.ExecuteScalar());   According to my understanding, this should return the ID column, but it just returns 0 every time. Any ideas?  EDIT:  When I run:  "INSERT INTO INVOICE (INVOICE_DATE, BOOK_FEE, ADMIN_FEE, TOTAL_FEE, CUSTOMER_ID) VALUES ('2009:01:01 10:21:12', 50, 7, 57, 2134);last_insert_id();"   I get:  {"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'last_insert_id()' at line 1"}
85136
All right, say I have this:  &lt;select id='list'&gt;     &lt;option value='1'&gt;Option A&lt;/option&gt;     &lt;option value='2'&gt;Option B&lt;/option&gt;     &lt;option value='3'&gt;Option C&lt;/option&gt; &lt;/select&gt;   What would the selector look like if I wanted to get "Option B" when I have the value '2'?  Please note that this is not asking how to get the selected text value, but just any one of them, whether selected or not, depending on the value attribute. I tried:  $("#list[value='2']").text();   But it is not working.
47081
I'm using arcpy.CalculateField_management to populate a field.  The expression:  "'https://anystate.gov/someportal/DisplayQueryResults.aspx?Prompts=Spill%20Number="!ID!"&amp;Database=OfficeDocs&amp;Query=DEP_Spill_Projects&amp;QuerySet=Portal_Queries&amp;User=Portal.DEP&amp;Password=DEPPortal1'"   will work when entered into the Calculate Field Tool.  The url is completed by pulling in values from the ID field.  However, the Python code snippet pasted into my script results in a syntax error. It's worth noting the expression is bounded by """"'....'"""" (4 double quotes outside a single quote.  I tried Midavalo's suggestion a couple of different ways. First attempt set  expression = 'https://anystate.gov/someserver/…{0}&amp;Database=OfficeDocs&amp;Query=DEP_Sp‌​ill_Projects&amp;QuerySe‌​t=Portal_Queries&amp;Use‌​r=Portal.DEP&amp;Passwor‌​d=DEPPortal1'.format‌​(!ID!)   Resulting in invalid syntax  Based on the Python link, the second try included single quotes:   'https://....'.format('!ID!')    But the result was a syntax error
64650
In an earlier question  I asked in general about the symbol table for an Apex class.  Using the Tooling API wrapper from  I am able to get part way there. But am unGodly confused.  If I go to the developer console, query editor, check the "Use Tooling API" box and run this query:  Select Id, Name, symbolTable FROM ApexClass Where Name Like '%NewCaseListController%'   I get back an ID, Name and [object Object] for the symbol table, meaning there is a symbol table object there.   But if I try the same query in Apex code in the execute anonymous window I get the error:   System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element location   If I do this in Apex I can get a result back, and according to the code for the class the result should be of type ToolingAPIWSDL.QueryResult. The QueryResult should contain a member consisting of a list of sObject_x records sObject_x[], unless I am mis-reading what that means.  ToolingAPIWSDL.QueryResult result = tooley.query('select Id, Name from ApexClass WHERE Name Like \'NewCaseListController\'');   I can take the result and apparently put the sObject_x object in it like this:  List&lt;ToolingAPIWSDL.sObject_x&gt; objList = new List&lt;ToolingAPIWSDL.sObject_x&gt;(); for(Integer i = 0; i&lt;result.records.size(); i++){     objList.add(result.records[i]); }   At least that does not throw an error and I can write:     System.debug('objList: ' + objList[0]);  And get a result, but how do I access the symbol table? Or more to the point, how can I get a list of methods and variables? I am assuming the symbolTable is the only way?
8401
I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.
120449
I am getting this error with the code below. I've looked into the other cases on here. In my case I am referring to a relationship name (__r) which I am assuming is pulling correctly. It's a field which is a lookup to User :   Agreement_CSH_to_be_completed_by__r  Here is the code which is giving me problems :   public void doManagedClients() {         addMsg('Starting processing of Managed Clients.');         Integer startSize = CSH_Data.size();          String SOQL = 'Select Id, OwnerId, Owner.UserName, Account__c, RecordTypeId, Name, Agreement_Client_Status_History__c ' +             'From Contract_Terms__c Where ' +             '   ( recordtypeid = \''+ ((String)A_N_Rectype).substring(0,15) + '\' ) and ' +                '   Agreement_Client_Status_History__c = \'Monthly\' ' +             'order by createddate desc nulls first' ; system.debug('#####333#### ');               addMsg(DEBUG,'Managed Query is: ' + SOQL + '\n');         for (Contract_Terms__c a: Database.Query(SOQL)) {             if (!a.Agreement_CSH_to_be_completed_by__r.isActive) {                 totalInactiveOwners++;                  addMsg('Account: ' + a.Name +  ', has an inactive owner.  Username: ' + a.Agreement_CSH_to_be_completed_by__r.isActive + '.');             } else {                             totalManagedCSHs++;                 addMsg(DEBUG,'Creating a Managed CSH for Account: ' + a);                 CSH_Data.add(new CSH_and_Share_Pair(a, createClientStatusHistory(a)));                 needflush(false);                 if (error) break;             }         }         needflush(true);         addMsg('End of Managed Clients.');           }   Is it just because I don't have a.Agreement_CSH_to_be_completed_by__r included in the SOQL ? I thought I got different errors for that, so I'm a little confused.  Thank you for your help.
26508
I have an SP2013 wiki page that I want to use a jQuery accordion on.  Just with some static content, not pulling any information from anywhere in SharePoint.  I created the page, inserted a script editor web part at the top, and inserted this snippet:  &lt;script src="//code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt; &lt;script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"&gt;&lt;/script&gt; &lt;script&gt;     $(function () {         $("#accordion").accordion({collapsible: true, active: false, icons:false });     }); &lt;/script&gt;   Then, I put the cursor under the script editor web part, and clicked on "Edit Source".  Then underneath the HTML that represents the script editor, I put this HTML (basically the jQuery accordion demo HTML):  &lt;div id="accordion"&gt;    &lt;h3&gt;       Section 1    &lt;/h3&gt;    &lt;div&gt;       &lt;p&gt;Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate.&lt;/p&gt;    &lt;/div&gt;    &lt;h3&gt;       Section 2    &lt;/h3&gt;    &lt;div&gt;       &lt;p&gt;Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In suscipit faucibus urna.&lt;/p&gt;    &lt;/div&gt;    &lt;h3&gt;       Section 3    &lt;/h3&gt;    &lt;div&gt;       &lt;p&gt;Nam enim risus, molestie et, porta ac, aliquam ac, risus. Quisque lobortis. Phasellus pellentesque purus in massa. Aenean in pede. Phasellus ac libero ac tellus pellentesque semper. Sed ac felis. Sed commodo, magna quis lacinia ornare, quam ante aliquam nisi, eu iaculis leo purus venenatis dui.&lt;/p&gt;    &lt;/div&gt;    &lt;h3&gt;       Section 4    &lt;/h3&gt;    &lt;div&gt;       &lt;p&gt;Cras dictum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aenean lacinia mauris vel est.&lt;/p&gt;       &lt;p&gt;Suspendisse eu nisl. Nullam ut libero. Integer dignissim consequat lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.&lt;/p&gt;    &lt;/div&gt; &lt;/div&gt;   After I saved the page, the accordion collapsed initially (as it is supposed to), but clicking on any of the headers does not expand the section.  If I go back into edit mode for the page, it works as expected - clicking a header expands the section.  Save it again, and it stops working.  What am I missing?  I don't think what I'm trying to do is all that complicated...  EDIT 12/8: Ok, so I put the jQuery and jQuery UI scripts in the site's Site Assets folder, and the behavior is the same -- the scripts do not get loaded in IE or Firefox unless the page is in Edit mode.  Incidentally I think the other script snippet, where I hook up the accordion, is also not getting loaded unless the page is in edit mode.  The reason I think this is that I changed the way I referenced the main jQuery script (to something that didn't work), and the debugger halted on $(function () { ...., saying $ was undefined.  So if jQuery is not loaded, and the debugger thinks $ is undefined, at least it's hitting that section of code.  Which makes me think that in non-edit mode, not only is jQuery not getting loaded, but that section of script is not getting loaded either, because the debugger is not choking on $.  Can anyone provide any insight as to why the Script Editor web part seems to be not working in IE and Firefox?  (Because apparently in Chrome it works fine.)
116319
I am trying to add jQuery to my page (it is not being added by default). The file is adding to the page but after drupal.js causing the error:  SCRIPT5009: 'jQuery' is undefined  drupal.js, line 5 character 1    The code that adds drupal.js to the page in common.inc  ... 'misc/drupal.js' =&gt; array(           'data' =&gt; 'misc/drupal.js',           'type' =&gt; 'file',           'scope' =&gt; 'header',           'group' =&gt; JS_LIBRARY,           'every_page' =&gt; TRUE,           'weight' =&gt; -1,           'preprocess' =&gt; TRUE,           'cache' =&gt; TRUE,           'defer' =&gt; FALSE,         ), ...   In my module hook_init I have:    drupal_add_js('misc/jquery.js', array(     'group' =&gt; JS_LIBRARY,     'weight' =&gt; -20,     'cache' =&gt; TRUE,   ));   I would think with a lower weight it would load before drupal.js?  The header of the page contains the following scripts:  &lt;script type="text/javascript" src="http://mysite.com/misc/drupal.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/misc/jquery.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/misc/jquery.once.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/default/files/languages/nl_c9aC92_wtuULa79-hTFcGPM53oqk1yKwciOa_Q3yO28.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/lang_dropdown/msdropdown/jquery.dd.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/lang_dropdown/lang_dropdown.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/devel/devel_krumo_path.js?mqdxrf"&gt;&lt;/script&gt;
67655
Does anyone know how to select an item in the DOM by ID with jQuery, when that ID has a space?   For example, the ID of my item would be  &lt;div id="content Module"&gt;Stuff&lt;/div&gt;   How would I select this with jQuery?   If I just do   $("#content Module").whatever()    jQuery will try to find an item with both the ID of content and the ID of Module, which is not what I am looking for.  I should add that I am working with an old code base where these two word ids are used extensively, so going through and changing all the IDs would be bad.
60845
I have used this jquery script on many of my sites with the same theme, settings, etc.  It's in a wordpress Genesis Child theme.  On my current local build, however, when I click on an a href that has the class "scroll", I am getting a console error that reads:    Line 19 of my app.js is this code that I have never had an issue with before:  $(".scroll").click(function () {         if (location.pathname.replace(/^\//, "") === this.pathname             .replace(/^\//, '') &amp;&amp; location.hostname === this.hostname         ) {             var target = $(this.hash);             target = target.length ? target : $("[name=" + this                 .hash.slice(1) + "]");             if (target.length) {                 $("html, body").animate({                     scrollTop: target.offset().top                 }, 1000);                 return false;             }         }     });   I am running jQuery 3.3.1. I have commented out all code in the app.js to identify where the issue may be coming from. This code is right at the top and I have added console.logs all over the document, which show in Console.  What am I doing wrong here?  Thank you!
21770
Run the following SEDE query: . All the tags except kyūjitai-and-shinjitai, renyōkei, あれ, and たい-form get auto-linkified. These happen to also be the only four tags that contain characters outside the standard set of allowed characters [a-z 0-9 + # - .]. It would be nice if these would auto-linkify too. (I imagine this is even more applicable for other language sites like  - if you , you find that well over half the tags don't linkify because they contain Cyrillic characters.)
108771
In the below scenario  i am Accepting the ID of object in the string form : What will be the best way to avoid the SQL injection for ASId.  public static List&lt;AB__c&gt;ABC(string ASId)         records = [select id, name,abc__c,der__f, from AB__c WHERE der__f = :ASId WITH SECURITY ENFORCED ORDER BY AB__c ASC NULLS LAST];