NetTalk Central

Author Topic: 'Other' Buttons on a NetWebBrowse  (Read 6241 times)

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
'Other' Buttons on a NetWebBrowse
« on: March 22, 2012, 09:25:36 PM »
I have a NetWebForm that has a NetWebBrowse procedure.
The Browse has 2x buttons:

Button1) Updates a record in Table A (the same table the browse is displaying), then refreshes the Browse.
Button2) Inserts a record in Table B, then refreshes the browse.

I am experiencing 2 issues:

1) When either button is clicked the Browse is not refreshed. I have the 'Refresh whole browse after server code runs' option checked for both buttons.
2) When the Form loads the Browse it is also processing the OnClick procedure of Button1. This should only happen when Button1 is clicked.

Please help!

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 'Other' Buttons on a NetWebBrowse
« Reply #1 on: March 23, 2012, 12:18:46 AM »
Hi Trent,

which build are you on?
Can you duplicate the effect in the Buttons example? If you have to tweak the app to duplicate the effect please post the tweaked app & dict here.

cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #2 on: March 23, 2012, 05:33:40 PM »
Hi Bruce,

Build 6.26.

I have fixed Button1 browse refresh which in turn fixed the OnClick procedure being run at Form load.

Now the issue I am experiencing is Button2 is not refreshing the browse after Server Code is run, it is not even running the Server Code. Please see attached example28 app:

MailboxesBrowseControl > Other21 button: Opens SomeForm procedure as a popup. Server Code sets SessionValues which changes the Browse filter when the browse is refreshed.

[attachment deleted by admin]

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #3 on: April 03, 2012, 03:20:57 PM »
Hi Guys,

Just following up on my previous post, please help when you get a chance.

Thanks,
Trent

willie53

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #4 on: April 03, 2012, 04:19:17 PM »
I had this same problem with some code I was hoping Bruce could help with.

When I used the on_click code, and put some code to process, I notice that the only click code was being process for every row, instead of when it's being click onl.

I tried client-server.. but then ran into other problems.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 'Other' Buttons on a NetWebBrowse
« Reply #5 on: April 05, 2012, 01:22:40 AM »
Hi Trent,

>> Now the issue I am experiencing is Button2 is not refreshing the browse after Server Code is run,

yes, I agree. fixed in 6.27. The "problem" here was that the browse was "on a form" and didn't know it when doing the refresh.

>>  it is not even running the Server Code. Please see attached example28 app:
hmm - on mine it did run the server code (after the popup closed) so perhaps you were off there.

but I think the root question - updating the browse - is sorted.

cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #6 on: April 09, 2012, 02:28:25 PM »
Hi Bruce,

Thanks for fixing that issue.

Is there an embed point for code to run when the button is pressed before the popup opens? I want to set a SV that is needed for the popup.

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 'Other' Buttons on a NetWebBrowse
« Reply #7 on: April 09, 2012, 08:05:41 PM »
no, there's no embed point. the button click takes place in the browser, so when the user clicks it, it executes.

However you can add any "parameter" you like to the button. for example;
'fred=1&charlie=6'
then in the destination;
p_web.StoreValue('fred')
p_web.StoreValue('charlie')

Then in the destination proc just make sure you use
p_web.GSV('charlie') when you want to use the value.

cheers
Bruce

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #8 on: April 09, 2012, 09:58:09 PM »
Fantastic that is exactly what I wanted, thanks Bruce! When do you think the next build of Nettalk will be released?

Regards,
Trent

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: 'Other' Buttons on a NetWebBrowse
« Reply #9 on: April 09, 2012, 10:52:26 PM »
6.27 should be up this morning.

trent

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: 'Other' Buttons on a NetWebBrowse
« Reply #10 on: April 09, 2012, 11:35:43 PM »
Legend!