CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 RESOLVED-Hide a Delete Image Link

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 01/07/2011, 12:25 AM

Hi Al..
I have an image link on a form that is a Delete Link.
It goes to another page where it goes through a bunch of checks prior to deleting a record.

I need this image link to be hidden unless the form is in Update mode.

I figured the easiest thing would be to hide show depending on a url variable (pid), if pid >=1 its an update and I want the button there... if pid <1, its an ADD and the button should hide.


On the BS event of the form I have this code:

  
  
$Form1->DeleteButton1->Visible = True;  
  
$get = CCGetFromGet("pid","");  
  
if ($get >= 1 )  
  
{  
$Form1->DeleteButton1->Visible = False;  
}  

but it is not hiding when pid >=1

Any ideas?
:-D
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
Waspman

Posts: 948
Posted: 01/07/2011, 12:44 AM

Have you set the image links visible property to dynamic?
_________________
http://www.waspmedia.co.uk
View profile  Send private message
datadoit
Posted: 01/07/2011, 6:49 AM

Perfect place to use the Hide/Show Component Action.

Instead of selecting Custom Code, choose the action.

Component Name: DeleteButton1
Action: Hide
Condition Type: Expression
Compare As: Text
Condition: CCGetParam("pid","") >= 1
ckroon

Posts: 869
Posted: 01/07/2011, 8:35 AM

Doh!

Thanks! Works great now
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
datadoit
Posted: 01/07/2011, 9:10 AM

Since you merely want to check if the form is in update mode...

Component Name: DeleteButton1
Action: Hide
Condition Type: Expression
Compare As: Text
Condition: !$Container->EditMode
ckroon

Posts: 869
Posted: 01/13/2011, 8:08 AM

awesome Data.. thanks!
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
damian

Posts: 838
Posted: 01/21/2011, 10:54 PM

definitely the latter option would be best...
_________________
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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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