NetTalk Central

Author Topic: SessionValueSetFromBrowser?  (Read 5771 times)

osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
SessionValueSetFromBrowser?
« on: November 27, 2019, 06:30:15 AM »
how is work and for what?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: SessionValueSetFromBrowser?
« Reply #1 on: November 29, 2019, 03:47:40 AM »
there is a JavaScript function you can call in your JavaScript code;

SetSessionValue(name,value)

the SessionValueSetFromBrowser is for embedding code in the server if you want to when that happens.

cheers
Bruce

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: SessionValueSetFromBrowser?
« Reply #2 on: December 02, 2019, 05:20:20 AM »
there is a JavaScript function you can call in your JavaScript code;

SetSessionValue(name,value)

the SessionValueSetFromBrowser is for embedding code in the server if you want to when that happens.

cheers
Bruce

Bruce, it is possible to have an example or a more specific explanation how this method works or there is an existing example that we can look for?

Thanks

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: SessionValueSetFromBrowser?
« Reply #3 on: December 02, 2019, 11:17:18 PM »
Hi Ura,

if you look in NetWeb.js you'll see examples there. Since this is a JavaScript function the examples are in JavaScript.
As to where you would use it - I guess that's up to you.

Cheers
Bruce


urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: SessionValueSetFromBrowser?
« Reply #4 on: December 03, 2019, 04:52:45 AM »
Hi Ura,

if you look in NetWeb.js you'll see examples there. Since this is a JavaScript function the examples are in JavaScript.
As to where you would use it - I guess that's up to you.

Cheers
Bruce

Hi Bruce:
 
Yes i am aware of the SetSessionValue from JavaScript. I think that part is clear for now :)

The part i am not so sure is how to use the SessionValueSetFromBrowser and where.

This is what i found about that call in the forum:
https://www.nettalkcentral.com/forum/index.php?topic=3968.msg14860#msg14860

For example, if i had a function in JavaScript, that function get some values from another server (API call) and i need to send back those values back to the NetTalk webserver.

As far as i understand, NetTalk does not receive returns from JavaScript functions.

How do i know in the NetTalk web server with SessionValueSetFromBrowser when the values are ready to use and are set with SetSessionValue('name','value').

Or i am mistaking that function as an observer, o something smilar to a callback?

Thanks