Skip to main content
Participant
November 25, 2016
Question

variable arrays?

  • November 25, 2016
  • 2 replies
  • 1013 views

I'm trying to edit this function for a Photoshop extension to include multiple variable names and multiple variable values. Any help is greatly appreciated. Thanks!

function variablesAll()

  {

    $('.variableTable').children('.singleVariable').each(function ()

    {

      var typeSelection = $(this).find(".variableSelect").val();

      var variableName  = "#MSRP"

      var variableValue = $(this).find(".MSRPValue input").val();

       

        var obj = {

        kind: typeSelection,

        key: variableName,

        value: variableValue

         

         

      }

      csInterface.evalScript( 'variableUpdater(' + JSON.stringify(obj) + ')' );

    });

  }

  $("#content").on("click", ".refreshAllVars", function ()

  {

    variablesAll();

  });

    This topic has been closed for replies.

    2 replies

    TheBCMan
    Participating Frequently
    January 11, 2017

    Your code seems to be missing the function variableUpdater, what does it do? Otherwise it looks like it would work, what is the issue?

    Chuck Uebele
    Community Expert
    Community Expert
    November 26, 2016

    You might get a better response in the coding corner forum, since this isn't straight extendscript, but looks like jquery. I'll move your post there.