Double Quotes Problem

Discussion in 'ASP General' started by Evertjan., Sep 19, 2003.

  1. Evertjan.

    Evertjan. Guest

    Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
    > I got a "double quote" problem when I try to give a background color
    > for the html page
    > txtMailBody = "<html bgcolor="#FFCC33">"


    txtMailBody = "<html bgcolor='#FFCC33'>"

    Can bgcolor be a attribute of the <html> tag, however?


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Sep 19, 2003
    #1
    1. Advertising

  2. Evertjan.

    Ice Man Guest

    Hi

    I want to send e-mails using an asp page
    first I create the mail Object: Set objMail =
    Server.CreateObject("CDONTS.NewMail")

    After I fill a variable with the html code that will be the mail

    txtMailBody = "<html>"
    txtMailBody = txtMailBody & "<center>Hi <BR> This is a test"
    txtMailBody = txtMailBody & "</html>"

    finally I send the mail using the following code:
    objMail.Body = txtMailBody
    objMail.Send

    I got a "double quote" problem when I try to give a background color for the
    html page
    txtMailBody = "<html bgcolor="#FFCC33">"

    Is there a way to accomplish this

    Thanks for all
    Ice Man, Sep 19, 2003
    #2
    1. Advertising

  3. Evertjan.

    Adrienne Guest

    Gazing into my crystal ball I observed "Evertjan."
    <> writing in news:Xns93FB6E09682F7eejj99@
    194.109.133.29:

    > Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
    >> I got a "double quote" problem when I try to give a background color
    >> for the html page
    >> txtMailBody = "<html bgcolor="#FFCC33">"

    >
    > txtMailBody = "<html bgcolor='#FFCC33'>"
    >
    > Can bgcolor be a attribute of the <html> tag, however?
    >
    >


    No, it can't. It can be an attribute of the Body element, albeit
    depreciated. Best method is to put everything into a style element in the
    head element.

    txtMailBody = "<html><head><title>Mail Message</title><style type=" & chr
    (34) & "text/css" & chr(034) & ">body {background-color:#FFCC33}</style>
    </head><body>Email message</body></html>"

    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
    Adrienne, Sep 19, 2003
    #3
  4. Evertjan.

    PB4FUN Guest


    > I got a "double quote" problem when I try to give a background color for

    the
    > html page
    > txtMailBody = "<html bgcolor="#FFCC33">"
    >


    The solution for a double quote problem is to double your quotes :

    txtMailBody = "<html bgcolor=""#FFCC33"">"

    Meindert, MCP
    PB4FUN, Sep 19, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris White

    Quotes/Double Quotes in Image Control

    Chris White, Sep 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    4,837
    Hermit Dave
    Sep 22, 2004
  2. Chris
    Replies:
    1
    Views:
    13,612
    Oisin
    Mar 24, 2006
  3. Lawrence Tierney

    Multiline quotes - escaping quotes - et al

    Lawrence Tierney, Dec 24, 2003, in forum: Java
    Replies:
    3
    Views:
    4,484
    Andrew Thompson
    Dec 24, 2003
  4. Sydex
    Replies:
    12
    Views:
    6,455
    Victor Bazarov
    Feb 17, 2005
  5. jOhn
    Replies:
    1
    Views:
    213
    Phlip
    Jan 29, 2008
Loading...

Share This Page