ckroon
Posts: 869
|
| Posted: 03/13/2008, 8:45 PM |
|
Hi all.
I have a panel that shows when a link is clicked. In that panel is a search grid for them to select a Term. I want the relevant Panel-Record Form combo to show up depending on what Ter they select.
There are three terms Panel-Record forms hidden.
I can't seem to figure out how to get the panel to show term 2 panel if the Term= 2 and the Term 3 Panel if the Term=3.. and I need it to hide the other terms that have not been selected.
This was my best attempt :) :
if (CCGetFromGet("term",0) == 1)
$Component->Visible = False;
else
$Component->Visible = True;
Thanks!
_________________
Walter Kempees...you are dearly missed. |
 |
 |
wkempees
Posts: 1679
|
| Posted: 03/14/2008, 3:52 AM |
|
Assuming a PanelMain on the page.
SubPanel1 SubPanel2 and SubPanel3
All 4 are set to Visible NO.
Making the PanelMain Visible, you have mastered , the rest is just as easy.
In each SubPanel's BeforeShow add
if (CCGetFromGet("term",0) == 1)
$Component->Visible = True;
of course for the first panel == 1, the second ==2 and the third ==3.
This should work straight out of the box, I just emailed you sample.
Of course there is a more fancy way, but this works.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 03/14/2008, 4:26 AM |
|
More fancy:
In the BeforeShow of the PAGE:
if ( CCGetFromGet("term",0) == 1 )
$Container->SubPanel1->Visible = True;
if ( CCGetFromGet("term",0) == 2 )
$Container->SubPanel2->Visible = True;
if ( CCGetFromGet("term",0)== 3 )
$Container->SubPanel3->Visible = True;
OR even more fancy:
switch ( CCGetFromGet("term",0) ) {
case 1
$Container->SubPanel1->Visible = True;
break;
case 2
$Container->SubPanel2->Visible = True;
break;
case 3
$Container->SubPanel3->Visible = True;
break;
}
Have fun!
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
ckroon
Posts: 869
|
| Posted: 03/14/2008, 10:45 AM |
|
Thanks Walter! 
The first example worked great!
( FYI: No email received...?)
_________________
Walter Kempees...you are dearly missed. |
 |
 |
wkempees
|
| Posted: 03/15/2008, 5:47 AM |
|
send me one and I'll reply to that.
I sent to Yahoo
"ckroon" <ckroon@forum.codecharge> schreef in bericht
news:547dab9c32c45c@news.codecharge.com...
> Thanks Walter! 
>
> The first example worked great!
> ( FYI: No email received...?)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
|