Quantcast
Channel: Adobe Community: Message List
Viewing all articles
Browse latest Browse all 90168

Re: Get value from Photoshop panel

$
0
0

Thanks for the answers guys. Sadly it doesn't work for me.

 

I created the project in Adobes Extension Builder 3. Created a html that looks like this:

<!doctypehtml>

 

<html>

<head>

<metacharset="utf-8">

<scriptsrc="./ext.js"></script>

<scriptsrc="./lib/CSInterface-4.0.0.js"></script>

 

<linkid="ppstyle"rel="stylesheet"type="text/css"href="./style.css">

<title>Title</title>

</head>

 

<bodyonLoad="onLoaded()">

<divid="content">


      <labelid="label"for="row">Row:</label>

      <inputtype="number"id="row"step="1"min="1"value="1"/>

 

     <buttonclass="button"id="create"onClick="onClickButton('PHXS')">Create</button>

</div></body>

 

</html>

 

 

A JS that looks like this (with all the Extension Builder generated code left above it):

function onClickButton(ppid) {

  var value = getElementById("row").value;

  

  var extScript = "$._ext_" + ppid + ".create('"+value+"')";

 

  evalScript(extScript);

}

 

 

My jsx looks like this:

$._ext_PHXS={

    create : function(value) {

     var res = "You send value - " + value;

     alert(res);

     return res;

    },

};

 

When I click the button in PS nothing happens. If I change the ( var value = getElementById("row").value; ) too something like ( var value = "hi"; ) then it sends the value. Looks like the getElementById doesn't work. Anyone know why?


Viewing all articles
Browse latest Browse all 90168

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>