NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: John Fligg on March 12, 2012, 07:20:59 AM

Title: User clicked on a row in the browse
Post by: John Fligg on March 12, 2012, 07:20:59 AM
I have a memory form with a button which calls a standard browse. In that browse in the above embed point I have some code.

The button is disabled based on a session variable. I reset that session variable in the embed point.

But how can I refresh the memory form or button so that it is enabled/disabled.

Thanks

John
Title: Re: User clicked on a row in the browse
Post by: Bruce on March 12, 2012, 07:31:49 AM
I think a small example posted here would be useful, both to demonstrate the question, and the answer.

cheers
Bruce
Title: Re: User clicked on a row in the browse
Post by: John Fligg on March 12, 2012, 07:41:27 AM
OK that may be difficult right now. So let me ask another question and it may be irrelevant.

Ona  Memory Form, I have code in Pre Update End. How can I close the window at that point in code based on a  condition.

Currently the condition works and says 'Invalid Settings' but goes on to open the window. Closing the window at this stage would be nice. I did try Exit but that is clearly not right as that adds blank lines to the form <g>

Thanks

john
Title: Re: User clicked on a row in the browse
Post by: kevin plummer on March 12, 2012, 02:47:49 PM
John I think you need to work out the condition before you call the form ie if invalid settings send to a page where they can set the settings etc.
Title: Re: User clicked on a row in the browse
Post by: Bruce on March 12, 2012, 10:27:25 PM
>>On a  Memory Form, I have code in Pre Update End. How can I close the window at that point in code based on a  condition.

I'm not sure what you mean by "close the window". This is a web browser - it only has one window. Everything you see in that window is a page - ie html. So you don't "close" anything, you merely decide what to send to the browser.

You can choose to send nothing of course, but that may not be what you have in mind.

Cheers
Bruce
Title: Re: User clicked on a row in the browse
Post by: John Fligg on March 13, 2012, 12:32:21 AM
OK here is the deal. I have actually changed my code now so all I need to do is check 2 things.

On the invoice browse I want to highlight a record and then click a button. That button must be disabled unless:

1. They have clicked on the browse and obtained the Invoice GUID
2. The invoice has a field completed.

The problem is that when I click on the browse I can check the 2 conditions but it seems impossible to enable or disable that button.

Remember that the button is on a memory form that calls the browse.

There must be a way and specific embed point.

Thanks

John