javascript – Approve / reject the workflow with customer-side comments

I have a list that is associated with a "SharePoint 2010 Approval Workflow" and I would like to provide the use of simple buttons to approve / reject the workflow after it is started. I managed to do it from JavaScript using the following code:

var context = SP.ClientContext.get_current();
var list = context.get_web().get_lists().getByTitle("Approval Tasks");
var item = list.getItemById(taskId);
item.set_item("WorkflowOutcome", "Rejected");
item.set_item("Status", "Rejected");
item.set_item("FormData", "Completed");
item.set_item("PercentComplete", 1);
item.set_item("Completed", true);
    function(sender, args) {
    function(sender, args) {

The problem that I am facing right now is that I can not find a way to write also in the "Comments" field by program. This field is displayed on the Approve / Reject form and it would be really useful for the user to be able to provide a description of the rejection using my custom buttons. I do not seem to understand where this information is stored.

I attach an image with the workflow task form so that you can better understand what I'm talking about (I've blackened the sensitive data and highlighted with a red rectangle the field I'm talking about).

Thank you very much for your support.

Workflow form

javascript – Undefined index: id_digited in C: xampp htdocs SGOP_PPI SGOP_PPI fine.php on line 37

I'm trying to compare the only value obtained by form, with what's in the database, but I get the error "Undefined index: id_digited in C: xampp htdocs SGOP_PPI SGOP_PPI fines.php on line 37 "

What can I do to compare myself and bring the rest of the information from this file?

Thank you so much !

Hello, I'm trying to compare the only value obtained by form, with what's in the database, but I get the error "Undefined index: id_digited in C: xampp htdocs SGOP_PPI SGOP_PPI fine.php on line 37 "

What can I do to compare myself and bring the rest of the information from this file?

Thank you so much !

		Mostrar Datos


escribe id del contrato

Mostrando Datos Desde Una Base De Datos

"; echo""; echo""; echo""; echo""; $lista_contratos = mysqli_fetch_array($ejecuta_sentencia); } ?>
Codigo Pais "; echo$lista_contratos('id_contrato'); echo""; echo$lista_contratos('id_obra'); echo""; echo$lista_contratos('id_contratista'); echo"

seo – Generate backlinks via a javascript video widget without getting any manual action penalties?

I am finishing an API project that will allow website owners to view related videos on all their pages with a simple javascript code. Associated videos are completely related to the content of the page. And the videos are displayed on the same page that they were clicked on so that the visitor does not leave the page. We hope this will increase the website owner's measures of time spent on the site, the length of the session and reduce their bounce rate while adding rich content to their page.

enter the description of the image here

The purpose of this API project was to generate backlinks to my website to increase my web presence. But now, I read that widget links can be hit by Google's manual actions as well as penalties. And I really do not understand any of this.

If a widget is so good that a website is ready to integrate it or run javascript with the backlink tracked inside the widget, would not Google see this as a signal that the link must have a very good content on its website? Why would they hit content developers with penalties like this?

I can offer the javascript widget with a backlink rel = "nofollow" inside the widget, but because of the costs and constraints of the server, the only way it will be worth it is to be able to get a backlink followed somewhere on the website of the user. Which is good, I can ask them to place a tracking link somewhere on their site. But the problem is that because of the https protocol that many sites use, I do not see any way to track websites that incorporate my javascript code and use my data. Therefore, if an https website uses my javascript widget a lot without creating a link to my site, I can not restrict access to its domain. I just do not know what areas do that.

I could check my apache logs to determine which IP addresses call my javascript code, but I imagine that it would be very difficult to determine which IP address refers to which web domain. And since https does not pass http_referer in PHP, I can not track the websites that use my data.

Is there a solution to this problem and a way for me to be able to offer this really useful widget with video content highly linked to websites while being able to guarantee that I get some kind of follow-up link in exchange for the Dramatic use of the server that my widget will need on my servers?

The code uses .load('') where is my domain. It would be really better not to offer secret API keys as I target wordpress users and learning curve for registration and implementation of access keys to API could deter the adoption of widgets.

Can I determine which https websites use my script with some kind of code? Or are there any other tips on how to implement backlinks without incurring penalty?

Here is an article about Rand at Moz's widget backlinks. It contains great information, but I do not think it definitely answers if the brand logo backlinks in the widgets are still safe.

Thank you

How to pass a Php page variable to a Javascript page

Well, my question is how to move a php variable to a Javascript page.

I have this variable $ temp in php, there it is constant but it will be variable


Move it here to Javascript I would greatly appreciate your help please. Thank you

enter the description of the image here


I'm trying to make the feature expand or not a box. The Delete button works normally, but not the Minimize button. I can see that clicking the button triggers an event in the DOM but for some reason the box does not respond as expected.



Area Chart

Here is the code. And these are the dependencies that are loaded into the application:

import 'modules/admin-lte/plugins/jQueryUI/jquery-ui.min'
import 'modules/admin-lte/plugins/jQuery/jquery-2.2.3.min'
import 'modules/admin-lte/dist/js/app.min'
import 'modules/admin-lte/bootstrap/js/bootstrap.min'
import 'modules/admin-lte/plugins/fastclick/fastclick'
import 'modules/admin-lte/plugins/slimScroll/jquery.slimscroll.min'

import 'modules/font-awesome/css/font-awesome.min.css'
import 'modules/ionicons/dist/css/ionicons.min.css'
import 'modules/admin-lte/bootstrap/css/bootstrap.min.css'
import 'modules/admin-lte/dist/css/AdminLTE.min.css'
import 'modules/admin-lte/dist/css/skins/_all-skins.min.css'
import 'modules/admin-lte/plugins/iCheck/flat/blue.css'

import './custom.css'

javascript – Code working differently on different environments

I studied for an upcoming exam and came across something weird.
Here's the prompt of the question:

You have a fashion catalog, an inventory of articles from different haute couture designers. Every designer has a range of shoes. Each shoe has a name and a price.

It looks like this:

 var currentInventory = (
    name: 'Brunello Cucinelli',
    shoes: (
      {name: 'tasselled black low-top lace-up', price: 1000},
      {name: 'tasselled green low-top lace-up', price: 1100},
      {name: 'plain beige suede moccasin', price: 950},
      {name: 'plain olive suede moccasin', price: 1050}
    name: 'Gucci',
    shoes: (
      {name: 'red leather laced sneakers', price: 800},
      {name: 'black leather laced sneakers', price: 900}

Your function must return the average cost of all shoes by creator in this format:

var expected = {
  'designers': (
      'name': 'Brunello Cucinelli',
      'averagePrice': 1025
      'name': 'Gucci',
      'averagePrice': 850

I have written code and it behaves differently, than I run it on or on the website of the hacker reactor practice exam. Here is my code:

function calculateAveragePricePerDesigner(inventory) {
  var result = {designers: ()};
  var parsedDesignerAverageCost = ();
  for (i = 0; i < inventory.length; i++) {
  result.designers = parsedDesignerAverageCost;
  return result;

function parseAverageCostPerDesigner(currentDesigner) {
  var currentShoes =;
  var result = {
    averagePrice: 0
  var cummulativeCost = 0;
  var numOfShoes = currentShoes.length;
  for (i = 0; i < numOfShoes; i++) {
    cummulativeCost +=;

  var average = cummulativeCost / numOfShoes;
  result.averagePrice = average;
  return result;

Can someone explain if my code is correct and maybe why inconsistency occurs? On, my code will compile but will not run in a way that I can not explain, and on the reactor hack website, it will not compile.
Thank you

How is Javascript used in HTML?

Hello friends,

How is JavaScript used in HTML?

javascript – SharePoint 2016 error webAbsoluteUrl

When I try to implement the following code in SharePoint 2016, I get the following error: Can not get the property 'webAbsoluteUrl & # 39; undefined or null reference

The developer tool points to this line var absoluteURL = _spPageContextInfo.webAbsoluteUrl;

        function getData(lName){
        var absoluteURL = _spPageContextInfo.webAbsoluteUrl;
        if(lName == "Navigation"){
            var endPointUrl = absoluteURL + "/_api/web/lists/getbyTitle('"+lName+"')/items";
            var endPointUrl = absoluteURL + "/_api/web/lists/getbyTitle('"+lName+"')/items?$select=parentNav/URL, parentNav/URLNAME,subLink&$expand=parentNav";

javascript – Pathfinding Algo – Game Development Stack Exchange

OK, I'm building a tower defense game using simple javascript.

Now, there is an industry that produces tanks and tanks after they exit the industry should follow the road to a warehouse.

My question is how to trace the route on which the tank will take. The tank will take the shortest route to the warehouse.

Thank you

can i put javascript in android studio

Hello friends, my question is that if I can load javascript in my Android studio code, then view it in a web view.
esque I'm a little new to this