Passing information from task pane in Word add ins RRS feed

  • Question

  • Hello there,

    I need some help with passing information from a form field of a word task pane html to the Javascript document in the Word Addin with Visual Studio (Visual Studio 2017, Word 2016).

    I created a form in HTLM with a specific form ID and I want the Javascript document to read the value that is entered in the form.

    HTML Code:  <form id="amount"> <input type="text" value="100"> Amount </form>

    How can I get the value from the form in the .js document? I suppose it would be something like thisbut it does not work.

    var xyz= $('#amount').val();

    It should be a fairly simple task, but unfortunately I am stuck.

    Many thanks for your help!!

    Thursday, March 14, 2019 6:54 AM