NetTalk Central

Author Topic: need help with this scenario  (Read 2512 times)

cwtart

  • Full Member
  • ***
  • Posts: 130
    • View Profile
    • CommPay Software
    • Email
need help with this scenario
« on: June 15, 2013, 06:27:48 AM »
C8 9661 NT 7.11

I need some suggestions as to how to do this:

I have a NetWeb form with a button added - in the validate embed for the button I am going to call a NetTalk web client procedure that is going to a web site and doing some page scrapping. This page scrapping procedure already works fine in my main app. In the middle of the page scrapping procedure a window may open that requires some input from the user.

Obviously I know I cannot open a Clarion window in the web server but how can I call a procedure that displays a web page (probably memory form) to get the user input and then return to the page scrapping procedure with the user input?

I will need to pass some parameters to the web form that needs to get the user input and then return the user's choice back to the non-web procedure.

I guess my primary question is how to call and display a Netweb form from the middle of another non-web procedure and return the user's input?

Thanks,

Chuck



Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: need help with this scenario
« Reply #1 on: June 15, 2013, 09:29:49 PM »
>> I guess my primary question is how to call and display a Netweb form from the middle of another non-web procedure and return the user's input?

short answer - that's not how it works. Remember at this point;
a) user initiated some action - you are now processing that action, and will send a response.
Then the thread ends.

b) user then initials another action, a new thread starts, you generate a response - thread ends.

So the literal answer to your question is that your WebClient should return some code to the calling procedure which indicates what the next step is. Perhaps that next step is "get more information" - and so that's what it does. Perhaps the reply is "here is the page" in which case you do something else. Perhaps you save the result in a session value for later processing.

But don't think of it as "interrupting" to get some more information" - break it down into discrete request/response connections.

cheers
Bruce