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

 Multiple CSS Styles

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message
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
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.