NetTalk Central

Author Topic: Session Value from within Javascript  (Read 3051 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 313
    • View Profile
    • Email
Session Value from within Javascript
« on: April 30, 2019, 02:39:54 PM »
Hi Guys,

Is it possible to set a session value from within a javascript condition?

peterH

  • Sr. Member
  • ****
  • Posts: 413
    • View Profile
Re: Session Value from within Javascript
« Reply #1 on: May 01, 2019, 12:35:31 PM »
I'm not sure what you mean by 'a javascript condition', but from javascript it's possible, yes.

Quoting a reply from Bruce sometime in 2012:

Quote
SetSessionValue(name,value);

in JavaScript. (be aware, it's case sensitive.)

That JavaScript function (with the familiar name) will send an asynchronous packet to the server containing the name, and value, and the server will automatically move that into the session queue for you.

please don't hurt yourself falling off the chair...

Cheers
Bruce

So - be careful (with the chair)  ;D

Update: the thread is named ?Reading hidden Field values? and was started by Devan on 21. May 2012.
Peter
« Last Edit: May 01, 2019, 09:05:39 PM by peterH »

rupertvz

  • Sr. Member
  • ****
  • Posts: 313
    • View Profile
    • Email
Re: Session Value from within Javascript
« Reply #2 on: May 02, 2019, 11:48:48 PM »
Thank you Peter,

Working well ;-)