I'm trying to figure out how to use KBM variables in a Custom HTML Prompt to set the title or other text. The manual page for the action focuses on using variables to gather input from a form. I'm sure the hints are there, but I'm not getting the magic mental click yet.
When I create a Custom HTML Prompt window based on Peter's sample code answering my question, "How Can I Create a Series of Minimal App Windows That Only Consist of a Titlebar?", as I reported it works great. I have a couple of things to work out to see how well it can work for my purposes, and among them (not previously mentioned because I hadn't thought it through and wasn't yet able to test at all) is this:
How do I get a KBM variable into the HTML for the title?
Here's a fragment of Peter's example:
For what I'm doing, I cannot hard code the value because there will be a different value for each Desktop Workspace and I want/need to be able to change the value for any particular workspace on the fly, without changing code or restarting the macro system.
I have seen places in this forum where constructions like this are referenced:
but I know that I can't just stick that into the HTML in place of the title text. I think that has to be part of a script in the header, but I've never done HTML scripting, so I'm missing a few layers of concept and context. I've worked with JavaScript APIs and JavaScript manipulation of PDFs, so I'm not worried about that level, but where and how it folds into the HTML of a Custom HTML Prompt has not been clear yet.
In the manual page for Custom HTML Prompt it says, "You may use any JavaScript that you normally could in an HTML page." Great. Of course it's not up to the KBM manual to teach me that aspect of HTML, but so far the introductory examples that I have found haven't made sense in the context of KBM.
Can someone help me with the steps that are needed to get a variable, e.g., KMVariableName
above, into the <title>
text?
Thanks.