NetTalk Central

Author Topic: NTWS as JavaScript engine?  (Read 1472 times)

Rhys Daniell

  • Newbie
  • *
  • Posts: 34
    • View Profile
NTWS as JavaScript engine?
« on: December 23, 2012, 09:20:27 PM »
I have a request to get some data from a remote site which requires JavaScript and then display it in a Windows app.

Seems to me I should be able to somehow use the Web Server templates to generate a page which does this (there's a .script method which looks promising) and then displays it in File Explorer.

Anybody done this or know whether it's possible?

TIA
Rhys

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: NTWS as JavaScript engine?
« Reply #1 on: December 23, 2012, 10:16:53 PM »
Hi Rhys,

I think you need to break this problem down slightly;

a) you need to get some data from a remote site. You say JavaScript is required to do this? That's probably not quite true, although it may be that you need to construct your HTTP request (using the NetWebClient class) quite carefully. JavaScript typically runs "in the browser" so although you can't run JavaScript in your program itself, you can almost certainly write Clarion code to construct the same request. I guess I would need more specifics though to be more specific.

b) you need to display information to the user. Does this need t be in HTML format? Or can it just be in normal clarion format (strings, text boxes, lists etc?)

c) A complete alternative is just to show the user the remote site, in your windows app, using File Explorer - which completely side-steps the two items above.

cheers
Bruce