NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: urayoan on September 08, 2020, 12:30:07 PM

Title: Procedure Called Multiple Times
Post by: urayoan on September 08, 2020, 12:30:07 PM
Hello:
  I am trying to grab a value that comes from a JavaScript in the embed point of the WebHandler called SessionValueSetFromBrowser. At the momment, so far so good, i grab the value when is set in the script. The problem i am having is, every time i access a page (NetTalk Procedure), that part is called multiple times. There is a way to make sure that, this embed is called just one time when the procedure is called or better yet, let the server know that i already have what i want after a specifi stage?
 
  I am trying to set a variable (check example below) and if the value is 0, to not execute that part of the code, but alas, it passes anyways.

Any suggestions?

Thanks in advance

IF p_web.GSV('yadayada') = 0  <-- this is set from another procedure
  some code (this parte is supposed to pass just when the value is 0)
END!
Title: Re: Procedure Called Multiple Times
Post by: Bruce on September 09, 2020, 03:55:22 AM
Hi Ura,

I'm not 100% sure I understand the question.
So yes, Depending on your server options (screen size, location etc) the browser may send a lot of session values back to you - and yes, that would likely happen on each "page".

So when you are grabbing the incoming value, perhaps inspect the contents of p_Name to see if it's the one you want?

cheers
Bruce

Title: Re: Procedure Called Multiple Times
Post by: urayoan on September 09, 2020, 03:59:53 AM

So when you are grabbing the incoming value, perhaps inspect the contents of p_Name to see if it's the one you want?

cheers
Bruce

I think the p_Name part would help. I check and let you know! Thanks
Title: Re: Procedure Called Multiple Times
Post by: urayoan on September 09, 2020, 10:41:22 AM
Confirming Bruce. It works like a charm. Thank you very much!