NetTalk Central

Author Topic: Disable button after click?  (Read 3721 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Disable button after click?
« on: November 12, 2013, 05:23:32 AM »
Hi Bruce

I have a Button calling a  procedure as a netwebpage with a target frame as '_blank'. This is working fine. If I add code under the server side code, nothing is happened with the code.I want to hide the button after it was click.

If I call the procedure in the serverside embedpont as WpageXXX(p_web) it is halfway working but not in a new frame, then my hide code for the button is working fine.

Any suggestions
Johan

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Disable button after click?
« Reply #1 on: November 15, 2013, 01:05:21 AM »
Hi
Is there anybody with suggestions please
Tanks
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Disable button after click?
« Reply #2 on: November 15, 2013, 01:49:29 AM »
buttons can't do 2 things.
you get to call a URL, or you get to have server-side code, not both.

(in the future you might be able to do both, but the _order_ of the two actions will always be undetermined.)

cheers
Bruce

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Disable button after click?
« Reply #3 on: November 15, 2013, 05:19:00 AM »
Tanks Bruce

How can I call the the procedure in code eg WpageXXX(p_web) to open in a new frame

Regards
Johan

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Disable button after click?
« Reply #4 on: November 17, 2013, 09:12:43 PM »
from memory use p_web.script()

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Disable button after click?
« Reply #5 on: November 17, 2013, 10:21:16 PM »
if you have a link on a page, then opening the result in a new tab is straight-forward.
you just set the "Target" to '_blank'

adding code on the server side, instructing the browser to go to a new page is also straight-forward.

p_web.Script(p_web.windowOpen('indexpage')) 

But what you are doing is neither of those, you want to open a different page, in another tab, and send this as an instruction from the server. That's harder because the browser usually sees it as a "popup" and blocks it from working.

the code is
p_web.Script(p_web.windowOpen('indexpage','_blank')) 

but as I say, I don't think you'll be happy with the result.

A better option is to move the server side code "into" the report procedure.

cheers
Bruce