0 Replies Latest reply on Feb 8, 2009 4:03 AM by DavideBarranca

    Passing more than one parameter to Javascript

    DavideBarranca Level 1
      Dear all,
      I'm having some troubles making this work (I'm scripting Photoshop CS4 mac and adding a panel via Flex)

      In Flex I've a panel with couple of sliders, and their values should be passed to a Javascript which looks like this:

      function inizializza(rMin, rMax) {
      ... do various stuff and filters with rMin and rMax in Photoshop

      In Flex I've a button that calls the function which should run the script (via CSXSInterface):

      public function callInitialize():void
      CSXSInterface.instance.evalScript("inizializza", sliderMin.value.toString(), sliderMax.value.toString());

      being sliderMax and sliderMin the slider's ID.
      Anyway, the problem is that only the first parameter is passed; if I modify the javascript (only one parameter allowed) and the Flex, it works flawlessy. Passing two parameters seems impossible. I've tried also adding some space and a comma:
      sliderMin.value.toString() + ", " + sliderMax.value.toString()
      but nothing works.
      Anyone's having any idea about it?!
      Thanks in advance