NetTalk Central

Author Topic: Run some code from a menu  (Read 3999 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Run some code from a menu
« on: December 05, 2011, 06:18:41 AM »
I cannot seem to get a handle on this one.

I have my menu and want to add an Item to run some code. That code must run conditionally so I assumed I could create a Page with a  button on (does not need to be fancy) and then when the button is pressed the code is run or the page closed.

I cannot seem to get started. I can add a menu item of course but sort of going round in circles. Any advice appreciated.

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Run some code from a menu
« Reply #1 on: December 05, 2011, 07:10:30 AM »
what must the code return to the browser?
ie what do you want the user to see after they select the menu item?

cheers
bruce

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Run some code from a menu
« Reply #2 on: December 05, 2011, 07:30:11 AM »
Bruce - a window with OK and Cancel basically. Then under the OK button will be the code I wish to run.

Should be really easy but cannot seem to get my head round it.

Thanks

John

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Run some code from a menu
« Reply #3 on: December 05, 2011, 09:21:48 AM »
Have you menu item point to a memory form.  Then put whatever buttons you need on the form. 

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Run some code from a menu
« Reply #4 on: December 05, 2011, 09:24:36 PM »
don is correct - use a NetWebForm as your procedure, not a NetWebPage.
Set the form to "memory".

you can place code under the "ok" button by putting it in the ValidateUpdate routine.

cheers
Bruce

linas@debetas.lt

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
    • Email
Re: Run some code from a menu
« Reply #5 on: December 06, 2011, 03:12:04 PM »
I was thinking the same..

Nettalk is briliant.

Linas
in love with the nettalk.