vikrant
Posts: 32
|
| Posted: 04/15/2008, 5:07 AM |
|
Hi,
I am using PHP and MySql, I want to use more than one css to my site. and so I tried following code:
<link rel="stylesheet" type="text/css" href='<?php echo ccgetsession("style") ?>' >
which is replace by original code:
<link rel="stylesheet" type="text/css" href="Styles/Style.css">
in html file.
but it is not working.
anybody have a solution??
_________________
Vikrant |
 |
 |
songohan
Posts: 89
|
| Posted: 04/15/2008, 6:55 AM |
|
Did you set session? Maby variable is not available....
I built in multiple stylesheets to my latest project. I have link that sets cookie with javascript. In cookie I store info on which style is selected.
in:
<link rel="stylesheet" type="text/css" href="Styles/Style.css">
I replaced "Style.css" with label that retrieves data from cookie on before show event. Guess you should as well add label and than in before show event retrieve style from session.
Andrej
|
 |
 |
DonP
|
| Posted: 04/15/2008, 4:08 PM |
|
You can't use PHP or other server programming in a CCS HTML template
file because it works only for files with the .php name extension. The
templates have the .html extension.
What you can do is to add a label where you want to dynamically make the
change, then add a Before Show event to it:
<link rel="stylesheet" type="text/css" href="{StyleSheet}">
In the Before Show event, use something like this:
$GridName->StyleSheet->SetValue(CCGetSession("style"));
Don (DonP)
vikrant wrote:
> Hi,
> I am using PHP and MySql, I want to use more than one css to my site. and so I
> tried following code:
> <link rel="stylesheet" type="text/css" href='<?php echo ccgetsession("style")
> ?>' >
> which is replace by original code:
> <link rel="stylesheet" type="text/css" href="Styles/Style.css">
> in html file.
>
> but it is not working.
> anybody have a solution??
> _________________
> Vikrant
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
vikrant
Posts: 32
|
| Posted: 04/15/2008, 11:38 PM |
|
it works thanks a lot...
_________________
Vikrant |
 |
 |
|