Briefly, you’ll want to create a new Text Script. You’ll notice at the top you have the choice of Selector, Text, or Selector and Text. The one you’ll probably want to start with is Selector. Click the radio button and then in the Selector text field above, you will insert your selector. This uses standard CSS syntax, so you can use it to select on an ID, Class, or HTML Tag, or any combination allowed by CSS.
To start writing the script, click Expand at the bottom. This will show you a very basic example of a selector script like you see below, where ‘results’ is the element returned by your selector. You can then begin to manipulate it however you need to.
var field, result = “”;
field = record.fields[“ExtraData”];
if (field !== “”) result += field;
results.html(result);
You may also want to take a look at this how-to that goes into a more advanced example of a selector script.
Thanks for your reply, but I think you miss understood my question, I have no problem accessing the results. (i.e. the selector that you are currently using for the script) but I want to access a different sellector (id or class item) that is outside of the scope of the script.