NetTalk Central

Author Topic: A button to run a process and call a WebForm  (Read 3088 times)

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
A button to run a process and call a WebForm
« on: April 16, 2012, 09:24:45 PM »
Hi all,

I've been looking, but I cannot seem to find a way to have a button on a browse, which when pressed, performs a couple of operations (creates a record on disk and prepopulates it with information, then automatically calls a WebForm to update the newly created record?

I've set the button to the 'Change' function, and that works in calling the WebForm, however because it is done via Javascript, my embedded code is not called when the button is pressed.

I am thinking I have to call the page from the Clarion source code, but I am not sure of which parameters are important?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: A button to run a process and call a WebForm
« Reply #1 on: April 16, 2012, 10:12:59 PM »
Hi Devan,

The key to understanding this is to fall back on the idea that the browser "requests" - the server "responds".

>> ... then automatically calls a WebForm

you've got the question backwards. The browser requests the Form. The form appears. If the form wants to add a record, jump into change mode, whatever, than all that should be on the _form_ not the browse button.

>> I've set the button to the 'Change' function, and that works in calling the WebForm, however because it is done via Javascript, my embedded code is not called when the button is pressed.

It's not a problem because it's called by JavaScript. It's a problem because the button press occurs _in the browser_ and hence the browser requests the form. At this point there is no "browse procedure".

So turn the problem around - figure out what, and where, you want to embed in the form.

cheers
Bruce

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: A button to run a process and call a WebForm
« Reply #2 on: April 17, 2012, 03:33:36 AM »
Yes, you are right again Bruce - over tiredness has made my brain freeze again.  I managed to get a workaround happening for now.

I think what this forum need is a 'fatigue meter' when I post a new topic.  Anything above 7 on the fatigue scale and you can pretty much guarantee that the question will be silly!
 
 ;D