Frank S.
|
Posted: 07/03/2002, 4:05 PM |
|
I thought I would share this with everyone. My problem has been in
hiding a table when a page initially loads with no record selected. This
is a grid/edit on one page situation (PHP-Mysql-Linux). Here's the code:
if (get_param("id") == "") {
$tpl->set_var("FormDetails","");
return;
}
This goes in the "Before Show" properties of the form in question. The
id is the "id" or searched for parameter by the sql statement. The
FormDetails represents the name of the form, Details.
So far this only works with templates. If anyone knows how to write this
for non-templates, please let me know.
Many thanks to Walker at CC Support for his help on this one.
Frank
|
|
|
Zio Richi
|
Posted: 07/04/2002, 2:51 PM |
|
Better call it in Open event?
"Frank S." <info@auuooh.com> ha scritto nel messaggio
news:3D238326.8090908@auuooh.com...
> I thought I would share this with everyone. My problem has been in
> hiding a table when a page initially loads with no record selected. This
> is a grid/edit on one page situation (PHP-Mysql-Linux). Here's the code:
>
> if (get_param("id") == "") {
> $tpl->set_var("FormDetails","");
> return;
> }
>
> This goes in the "Before Show" properties of the form in question. The
> id is the "id" or searched for parameter by the sql statement. The
> FormDetails represents the name of the form, Details.
>
> So far this only works with templates. If anyone knows how to write this
> for non-templates, please let me know.
>
> Many thanks to Walker at CC Support for his help on this one.
> Frank
>
|
|
|
Frank Rocco
|
Posted: 07/05/2002, 11:42 AM |
|
Would this not work in the Custom Show?
//-------------------------------
//-------------------------------
// employees Show Event begin
if (!empty(get_param("s_employee_name")))
{
// employees Show Event end
//-------------------------------
//-------------------------------
// Process the HTML controls
//-------------------------------
?>
<tr>
<td ><font ><a
href="<?=$fldemployee_id_URLLink?>?employee_id=<?=$fldemployee_id_employee_i
d?>&<?= $transit_params ?>"><font
><?=$fldemployee_id?></font></a> </font></td>
<td ><font >
<?= tohtml($fldemployee_name) ?> </font></td>
</tr><?
}
//-------------------------------
|
|
|
Frank Rocco
|
Posted: 07/05/2002, 12:27 PM |
|
I found that this works in the Custom Show Page Event
Look at the
// Code Add - Start
// Code Add - End
//===============================
// Display page
//===============================
// HTML Page layout
//-------------------------------
?><html>
<head>
<title>CCPHP</title>
<meta name="GENERATOR" content="YesSoftware CodeCharge v.2.0.5 build
11/30/2001">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"></head>
<body >
<table>
<tr>
<td valign="top">
<?php Search_show() ?>
</td>
</tr>
</table>
// Code Add - Start
<?php
$x = get_param("s_employee_name");
if (empty($x)) { return; }
?>
// Code Add - End
<table>
<tr>
<td valign="top">
<?php employees_show() ?>
</td>
</tr>
</table>
</body>
</html>
<?php
|
|
|
|