NetTalk Web Server > Web Server - Ask For Help

send value to server appears not to be working for buttons

(1/1)

ozejohn:
Hi,

I need to make a netwebform with a whole lot of buttons that run processes and routines. To test this I added a button to the example 1 application. I then clicked the return value to server checkbox for the button. In the embed point I put a message and a halt statement.

When I click the button the message and the holt statement never execute. I can see a get on the server but the embed code does not run.

Is there any way to make the send value to server checkbox to cause the embed code to work for buttons?  This is really critical to me as I have a lot of quite complex windows that need to trigger background processes from buttons.

Bruce:
Hi John,

I tested this in example 28.

(note: I had to add "text" to the Change button on the browse, which then allowed me to go to the form.)

There's a server button on the form, and the server code contains a STOP statement (which you will have to UNCOMMENT to see working...). That all seems to be working here, so here is the checklist for your server-side form button:

Type: MUST BE Button
Must nave a Name.
Hyperlink: Must NOT have anything set
Client-Side: Must be "Send new value to server" on.

And obviously, your embedded STOP statement must be in the right place.

cheers
Bruce

PS - some people have suppressed MESSAGE statements completely in their web apps, using MessageBox or something like it, and then forget this, and then of course using MESSAGE as a debug tool leads to some confusion....

ozejohn:
Bruce,

I agree Bruce it works. When I was testing this I had a hyperlink behind the button.

Thanks for the help and Happy New Year.

John Nairn

Navigation

[0] Message Index

Go to full version