NetTalk Central

Author Topic: Re: Post messages to the client  (Read 3785 times)

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Post messages to the client
« on: April 04, 2016, 08:23:42 AM »
Hi Bruce and Jari,

Posting using JavaScript:

p_web.Script('window.alert("Your message")')

will broke anything?

I'm sending a message to user from inside WebHandler as a result from processinglink but I have some troubles trying to catch only one event. Seems that processinglink is called multiple times in the same thread an in other thread based on GetValue that came in GET message for example.

Cheers,

Marcos

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Post messages to the client
« Reply #1 on: April 05, 2016, 06:19:39 AM »
Hi Marcos,

I have moved this message into a separate topic as it has nothing to do with web-socks, which is what the original post was about.

>> p_web.Script('window.alert("Your message")')
>> will broke anything?

depends on where you put it. I don't think it'll break anything.

>> I'm sending a message to user from inside WebHandler as a result from processinglink but I have some troubles trying to catch only one event.

what event, for what URL, are you trying to catch?

>>  Seems that processinglink is called multiple times in the same thread an in other thread based on GetValue that came in GET message for example.

ProcessLink is a complicated method which does many things. But i don't know what you are trying to do so I'm not sure what to suggest.

cheers
Bruce


Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Post messages to the client
« Reply #2 on: April 07, 2016, 04:41:17 AM »
Hi Bruce,

As I wrote in another post now I could find a way to filter using others SessionValues as a flag to catch the events in processlink. When all variables arrives I test if all SessionValues flags are true then I change their values to not to enter again and can process it one time.

Because this applet that I'm using I end up mixing JavaScript and NT.

The process that I'm trying to do is:

1. Call an applet that return values
2. With these values call an external WebService with json (including an ActiveX)
3. Catch response in json and get a value that will be used as a login user identifier
4. Open LoginForm or do this all above with LoginForm opened with login user primed and proceed normally

What was done:

1. Used SecWin but as I don't know if it is interfering I decided to remove while resolving the above.
2. Tried to create a new thread that can process the above but end up inserting directly in WebHandler because in Start method I can't pass p_web. I'm concerning about performance and not to load WebHandler processing things.
3. Call the above from LoginForm opened but I coudn't find a way to get it work yet

This application is very critical and should treat thousand of users.

As I read in others posts It's difficult to define how many users NT can handle.

Thank you.

Marcos

Sibuya

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Email
Re: Post messages to the client
« Reply #3 on: April 08, 2016, 04:04:23 AM »
Hi Bruce,

Thank you for explanations on Webinar #100!

Cheers,

Marcos