CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 After Initialize event

Print topic Send  topic

Author Message
knackje

Posts: 30
Posted: 01/06/2009, 12:21 AM

I want to hide the submit button when when the label 'year' has the value: 2008.

On this forum i had read you can do this with the 'After Initialize event' on a page. But never used it...

So i add the following code to the 'After Initialize event' of the page named 'toko_deel'

My form is named: form1

  
function Page_AfterInitialize() {  
global $toko_deel;  
  
  if ($toko_deel->$form1-->year->GetValue()  == 2008 {   
    Button_submit->Visible = False;  
  }  
}  

But i get the error that i'm reference to a non object. I think i must be in this part: ($toko_deel->$form1-->year->GetValue()

cause normally when using a evnt on a form i never use this part: $toko_deel. but now i'm using a event on the whole page.

any one an idea?

View profile  Send private message
damian

Posts: 838
Posted: 01/06/2009, 3:36 AM

try in Before Show on grid -

    
  if ($component->$year->GetValue()  == 2008 {     
    Button_submit->Visible = False;    
  }    

_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.