Skip to main content
Participant
Nov 25, 2016 8:06 PM UTC
Question

variable arrays?

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 is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    TheBCMan
    Participating Frequently
    Jan 11, 2017 8:24 AM UTC

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

    Translate
    Chuck Uebele
    Community Expert
    Community Expert
    Nov 26, 2016 4:12 AM UTC

    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.

    Translate