-- Regards Paul Whitham Macromedia Certified Professional for Dreamweaver MX2004 Valleybiz Internet Design [url]www.valleybiz.net[/url] Team Macromedia Volunteer for Ultradev/Dreamweaver MX [url]www.macromedia.com/support/forums/team_macromedia[/url] "ericMorcombe" wrote in message news:d4dmtg$4dp$1@forums.macromedia.com...[quote] > Bit new at this Paul. Could you provide an example of code please?[/quote] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Paul Whitham TMM [ip] => paul@valleybiz. [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> ASP Functions & Style Sheets - Dreamweaver AppDev

ASP Functions & Style Sheets - Dreamweaver AppDev

Can anyone tell me if it's possible to attach style sheets to functions. <% Function answerTypeA(A) If A = 1 then A = 'Never' elseIf A = 2 then A = 'Seldom' elseIf A = 3 then A = 'Sometimes' elseIf A = 4 then A = 'Often' elseIf A = 5 then A = 'Always' End If Response.Write A End Function What I''m trying to do is have a different colour for each option. Or is there another way to change the text colour?...

  1. #1

    Default ASP Functions & Style Sheets

    Can anyone tell me if it's possible to attach style sheets to functions. <%
    Function answerTypeA(A) If A = 1 then A = 'Never' elseIf A = 2 then A =
    'Seldom' elseIf A = 3 then A = 'Sometimes' elseIf A = 4 then A = 'Often'
    elseIf A = 5 then A = 'Always' End If Response.Write A End Function What
    I''m trying to do is have a different colour for each option. Or is there
    another way to change the text colour?

    ericMorcombe Guest

  2. #2

    Default Re: ASP Functions & Style Sheets

    As ASP code is executed before the page is rendered in the browser you can
    write you CSS dynamically. Simply place your IF statement where the color of
    the element is defined.


    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "ericMorcombe" <webforumsusermacromedia.com> wrote in message
    news:d48jfk$kpo$1forums.macromedia.com...
    > Can anyone tell me if it's possible to attach style sheets to functions.
    <%
    > Function answerTypeA(A) If A = 1 then A = 'Never' elseIf A = 2 then A =
    > 'Seldom' elseIf A = 3 then A = 'Sometimes' elseIf A = 4 then A = 'Often'
    > elseIf A = 5 then A = 'Always' End If Response.Write A End Function
    What
    > I''m trying to do is have a different colour for each option. Or is there
    > another way to change the text colour?
    >

    Paul Whitham TMM Guest

  3. #3

    Default Re: ASP Functions & Style Sheets

    Bit new at this Paul. Could you provide an example of code please?
    ericMorcombe Guest

  4. #4

    Default Re: ASP Functions & Style Sheets

    Try something like this to dynamically set a color based on a value stored
    in a database

    <!--
    ..style1 {
    font-family: Georgia, "Times New Roman", Times, serif;
    color: <%=recordset.fields.item("color").value%>;
    }
    -->

    --
    Regards

    Paul Whitham
    Macromedia Certified Professional for Dreamweaver MX2004
    Valleybiz Internet Design
    [url]www.valleybiz.net[/url]

    Team Macromedia Volunteer for Ultradev/Dreamweaver MX
    [url]www.macromedia.com/support/forums/team_macromedia[/url]

    "ericMorcombe" <webforumsusermacromedia.com> wrote in message
    news:d4dmtg$4dp$1forums.macromedia.com...
    > Bit new at this Paul. Could you provide an example of code please?

    Paul Whitham TMM Guest

Similar Threads

  1. Lost style sheets
    By Mike Martin in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: December 1st, 12:00 AM
  2. How to: Inline style sheets
    By mmorton23 in forum Macromedia Dynamic HTML
    Replies: 11
    Last Post: August 28th, 04:21 AM
  3. Cascading Style Sheets
    By Pete Walburn in forum ASP.NET Data Grid Control
    Replies: 2
    Last Post: November 9th, 08:13 PM
  4. Style Sheets
    By KellyJ webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 3
    Last Post: July 28th, 12:40 AM
  5. Using external style sheets
    By Kevin Spencer in forum ASP.NET General
    Replies: 0
    Last Post: July 9th, 06:03 PM

Bookmarks

Posting Permissions

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