CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 [RESOLVED]Hide / Show issue

Print topic Send  topic

Author Message
will

Posts: 88
Posted: 06/09/2009, 10:58 AM

i have a record inside of a panel and i have a hidden field with the hidden field is called mid

I want it if the value of mid is 1 to hide if its not 1 show but everything i have tried is not working
View profile  Send private message
Gena

Posts: 591
Posted: 06/09/2009, 11:36 AM

but what you have tried?

if ... else should work.
_________________
Gena
View profile  Send private message
melvyn


Posts: 333
Posted: 06/09/2009, 11:41 AM

what are you trying to hide or show? the entire panel?

I guess the entire panel. The hidden field is inside him. It only get evaluated when the panel is shown, ergo it can't kill himself and his parent.

Try the filed out of the panel.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
will

Posts: 88
Posted: 06/09/2009, 12:06 PM

ok what i have is i have 2 panels one is to display the profile of a member and one is to display the profile of the admin there is no security on this page its public info

my users table has a field called mid

members have a mid of 1
admins have a mid of 2

i have a link on the users name and i added the parameters uid and mid

if the mid in the url is 2 i want it to show the admins panel if mid is 1 i want it to show members panel
View profile  Send private message
will

Posts: 88
Posted: 06/09/2009, 12:20 PM

basicliy i have 2 panels

panel 1
record members
mid=1 <---hidden field

panel 2
record admins
mid=2 <--- hidden field

if mid in the hidden field equals 2 hide panel 1 show panel 2 if hidden field is 1 hide panel 2 show panel 1



View profile  Send private message
Waspman

Posts: 948
Posted: 06/09/2009, 1:00 PM

So you set Hide/Show perameters for each panel based on the contents of the URL.

Do it seperatly in before show actions.

Panel 1 - Hide if URL mid doesn't = 1

Panel 2 - Hide if URL mid dosen't = 2

T
_________________
http://www.waspmedia.co.uk
View profile  Send private message
will

Posts: 88
Posted: 06/09/2009, 1:02 PM

mid is not in the url its in a hidden field in each record
View profile  Send private message
Waspman

Posts: 948
Posted: 06/09/2009, 1:05 PM

No different, just "Hide if control mid doesn't = 1" etc.


Like melvyn said is the data being called at the same time as you trying to hide the panel?

_________________
http://www.waspmedia.co.uk
View profile  Send private message
will

Posts: 88
Posted: 06/09/2009, 1:07 PM

on panel 1 i have on the panel before show

page name is profile

record for panel 1 is name members
record for panel 2 is name admins

the hidden fields in both records are mid

panel 1 mid hidden field is set to 1
panel 2 mid hidden field is set to 2


if($profile->mid->GetValue()==1)
{
$profile->Panel1->Visible = true;
} else {
$profile->Panel1->Visible = false;
}

on panel 2 i have on before show

if($profile->mid->GetValue()==2)
{
$profile->Panel2->Visible = true;
} else {
$profile->Panel2->Visible = false;
}

View profile  Send private message
will

Posts: 88
Posted: 06/09/2009, 1:35 PM

ok here is what i did

i redid the logic

I have panel 1
i have panel 2

i created a recordout side of both panels and its call users
in it i added a hidden field connected to users database called mid now it works perfect

I want to hide panel 1 if the value in mid is 2 if its 1 it should show
if the mid is 2 i want panel 2 to show and hide panel 1

on my page i did this on before show

page is called profile


if ($profile->users->mid->('mid',1)==1)
{
$profile->Panel2->Visible = true;
$profile->Panel1->Visible = false;
} else {
$profile->Panel1->Visible = true;
$profile->Panel2->Visible = false;
}
View profile  Send private message
melvyn


Posts: 333
Posted: 06/09/2009, 2:00 PM

if ($profile->users->mid->GetValue() ==1 )

Take in mind that hidden field must be a CCS component, not just a html text field
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
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.

Web Database

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.