Returning and Displaying result from JS subFunction on WordPress page

Avatar
  • updated
  • Answered

I have a pair of nested functions to parse an XML document. The subfunction does the heavy lifting and creates the text string that I'd like to display on a WP page. The variable I'd like to pass is out of scope for the document.write() function and I can't figure out how to pass the result back to the main calling function. Any help would be appreciated. Please tread lightly - I'm new to most of this.

Avatar
johnpaulb-imhs1
Hello,

Thank you for your question regarding returning and displaying a result from JS subFunction on Wordpress page. You may be able to create a "global" variable that is accessible, but this will require you to custom-code/develop a solution.

If you are having a lot of trouble coding a solution you may want to consider hiring a developer to work with you.

Thank you,
John-Paul