NetTalk Central

Author Topic: Call a procedure inside a static html  (Read 2900 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Call a procedure inside a static html
« on: November 04, 2019, 01:50:02 AM »
Hi

I'm trying to call a procedure inside a static html. The procedure of course has the NetWebServerWorker as parameter.
I have tryed this: <!-- Net:myprocedure --> in the top and in other places in the document, but it has no effect.
It should work with forms and browses. Mine is a source.

Any idea?

Regards Niels



DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Call a procedure inside a static html
« Reply #1 on: November 04, 2019, 02:33:28 AM »
Any static page mmust have the <!-- Net:WebServer --> server tag at the top of the page. 

From the docs:

Static pages (usually .htm pages on disk) that contain tags have to be parsed by the server. If you use a static page on the disk these tags can still be used. However in that case the first line of the page must be

<!-- NetWebServer -->
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Call a procedure inside a static html
« Reply #2 on: November 04, 2019, 04:27:59 AM »
Hi Don

"Any static page mmust have the <!-- Net:WebServer --> server tag at the top of the page."
I know. All the static tags is in play in my html document. And all my session vars working perfect.
My goal is to initilize a bunch of session vars used i the document so the document can be called with a parameter and filled in individually.
Makes sense?


Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: Call a procedure inside a static html
« Reply #3 on: November 04, 2019, 11:01:59 PM »
What Procedure Template is myprocedure ?

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Call a procedure inside a static html
« Reply #4 on: November 04, 2019, 11:15:28 PM »
Your question showed the way.
Of cause it has to be a NetWebSource and not a Source.
How embarrassing...

Thanks!