CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Is there a way to hide a link?

Print topic Send  topic

Author Message
martin47

Posts: 35
Posted: 12/06/2008, 3:49 PM

I have a link component and an input text on a page. Depending on a value on a DB (I know how to do that), I need to:
-Show or hide the link label.
-Activate / deactivate the readonly property of the input text.

Can someone help me and tell me if this can be done?

So far only found how to hide a simple label, not a link.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 12/06/2008, 6:07 PM

Hi

Try This...

Select the link you want to work with in the design mode.
In the properties window click on events
In the before show event select add action
For the action select Hide-Show Component
For the properties of Hide Show Component Set your parameters

The Same will work for the label or input text

Or you could put all the stuff into a panel and hide or show the panel the same way.

Hope That Helps.. If you need more help, let me know

Have fun


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
martin47

Posts: 35
Posted: 12/08/2008, 4:49 AM

Thank you jjrjr1.

Could you help me a little bit more? I'm having problems trying to figure out how to set the parameters of the component. Do you have an example you can point me to? I don't find the help file very useful.

For example, I want the object to show according to a value saved on a session variable. How do I set that?

Thanks ahead again!

View profile  Send private message
jjrjr1


Posts: 942
Posted: 12/08/2008, 8:27 AM

Hi.

Ok

You want it to show based in a session variable.

1. In design mode select the component you want to set.
2. In property window set visible to no
3. select in events, before show, add action, hide-show component
4. in the properties window for the hide-show component action select component name
6. for action select show
6. Select the condotion you want
7. in parameter 1 select source type to be session
8. for name type in the name of youyr session variable
9. in parameter 2 select source type to be expression (or whatever type you want to test)
10. for name type in an expression you want to compare to eg: "", 1, $value etc
this example of for the case of an expression meaning you can set your value.

Hope that helps.

Have fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
martin47

Posts: 35
Posted: 12/09/2008, 8:38 AM

Thank you jjrjr1! I did understand perfectly and it worked!

I will abuse your solidarity by asking one more thing. You probably can tell me if this is also achievable too.

I wonder if is possible to do the same thing but instead of showing / hidding the component, can be abled or disabled. Basically I have a text field in the same page that should be editable or not according to this same session variable. Is that possible? I don't see a component that can do that.

Thanks again.
View profile  Send private message
martin47

Posts: 35
Posted: 12/09/2008, 9:01 AM

I just wanted to update that I did an "experiment" by editing the show/hide component, replacing the visible=true line to disabled=true and didn't work.
View profile  Send private message
jjrjr1


Posts: 942
Posted: 12/10/2008, 9:30 AM

What Martin???

You have confused me..

Hide show only affects the visibility of the comonent. Where do you have an option to set disable???




_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
martin47

Posts: 35
Posted: 12/10/2008, 11:22 AM

jaja, sorry, I just try to edit the raw code generated on the events.php page that the component created.
View profile  Send private message
melvyn


Posts: 333
Posted: 12/17/2008, 11:43 AM

This can be achieved from different ways

Quote martin47:
I wonder if is possible to do the same thing but instead of showing / hidding the component, can be abled or disabled. Basically I have a text field in the same page that should be editable or not according to this same session variable. Is that possible? I don't see a component that can do that.

This one is the quick and dirty, it works.

Set 2 components for that field:
1 label
1 edit box

When checking wich must be visible (following the Real's recommedations, you can set one of them as visible = false (the label or the edit box), according to it's value.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
martin47

Posts: 35
Posted: 12/18/2008, 3:44 AM

Thank you Malvyn, that sounds like a logical solution. I'll try it and post how it worked as soon I can do it.

Thank you both for the help.
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.