How can I set value to Java Script variable with C# variable? RRS feed

  • Question

  • I am developing bridge between Skype for Business / Teams and some API who is written in Visual C#.

    According to my knowledge is the Skype SDK in .js - I need to access the presence value for logged in user. I almost know how I can access the value from Java variable and display it in C# variable (through hidden fields). But I need to send C# variable value to the same Java variable to change the value in the Java variable.

    Can anyone advise me how to resolve this? 

    Sigurður H Alfhildars

    Friday, March 22, 2019 8:41 AM

All replies

  • You mentioned both Javascript and Java.  Those are two completely unrelated things.  Which one is it?  The Skype Web SDK is, in fact, in Javascript, but that's running inside your browser, which you can't get at through C#.    The Skype for Business App SDK is in Java, but it is designed for Android and iOS apps, not for desktop.

    What kind of app are you writing?

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Friday, March 22, 2019 9:08 PM
  • Sorry about that misunderstanding. The variable is in JS files - and I need to change the value of the variable through value in C# variable.

    Sigurður H Alfhildars

    Sunday, March 24, 2019 9:44 AM
  • The Javascript files are running inside your web browser.  There are APIs to allow you to access the HTML DOM on a browser page, but I'm not sure there's a way to access the Javascript environment.  You should go look at some of the Chrome API documentation 

    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Monday, March 25, 2019 6:25 AM