dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Making link to different CSS's dynamic

  1. #1
    Join Date
    Jan 2003
    Location
    Australia
    Posts
    27

    Exclamation Making link to different CSS's dynamic

    I have 3 different CSS files: DesignA.css, DesignB.css, and DesignC.css. I want to display a particular page with one of these CSS's depending upon a table field 'Design' and it's respective value 'A' 'B' or 'C'.

    I am currently programming this application in JavaScript/ASP (I am new at coding).

    So I was just looking for some code to put into <link rel=stylesheet href="/path/<dynamic code here>" type="text/css">

    Any ideas?

    Thanks!

    ~MVA

  2. #2
    Join Date
    Nov 2002
    Posts
    984

    Re: Making link to different CSS's dynamic

    Originally posted by mangeloni
    Any ideas?
    You'll probably get more and better answers asking in the JavaScript and/or ASP section, since the solution this is not a CSS related question.

  3. #3
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    Hi,
    i agree with you Stefan this is an ASP question, still to keep answers to questions in the same thread i will answer this one here, sorry if posting in wrong forum .

    pull your values from the database and then write value to variable

    designletter = rs("design")
    <link rel=stylesheet href="/path/design<%=designletter%>.css type="text/css">

    hope this helps

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles