SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code above DOCTYPE causing a problem

    I have a page that has some Cold Fusion code (cfmail tag specifically) above the DOCTYPE. I have done this on many occasions before and it works fine. The code works, but for some reason in IE it shifts the page left, when it should be centered, and no calculation results show up. In FireFox it works great, no problem.

    Here is the form that you need to fill out first to get see the problem. Once you press, "Calculate" you go to a results page, this is where the problem is.

    Would love some help on this one. It is all I left on a site and I can not seem to get this working correctly and it is driving me crazy.

    Thanks.
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have not had the problem before then you were just lucky. If anything at all is placed before the doctype, IE goes into quirks mode and there is no way around this.

  3. #3
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Above DOCTYPE is BEFORE. Just another way of saying it.
    My code looks like this:
    Code:
    <cfmail 
    from= "#EmailAddress#"
    to="#EmailAddress#" 
    bcc="houston@hbip.com"
    subject="Texas Move PRO	QUOTE" 
    server="localhost"
    type="HTML">
    <CFPARAM NAME="mileage" DEFAULT="0">
    <CFPARAM NAME="form.do_elevator" DEFAULT="No">
    .
    .
    .
          </table></td>
        </tr>
      </table>
    <div style="font-weight:bold; font-size:9px; width:660px; text-align:center;">*All online quotes are approximations. Contact Texas Move PRO @ 214-528-9200 for exact pricing and scheduling. <br>
    <span style="font-size:12px; font-weight:bold;">QuoteTotal $ #Total#</span></div>
    <p>Additional Comments:<br>
    #textarea#
    </p>
    </cfmail>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    .
    .
    .
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.

  4. #4
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why can't you just stick your code after the doctype?
    (sorry if you can't do this in coldfusion but I have never used that programming language before)

  5. #5
    SitePoint Guru htown's Avatar
    Join Date
    Mar 2005
    Posts
    670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, As per some instructions I read a while back, the CFMAIL (ColdFusion) tag has to go before the DOCKTYPE. It is not actually part of the web page.

    I have it working now. It was some eronious Javascript beleive it or not. I guess IE didnt like it.
    Houston Brown
    Split Light Designs
    Bringing your ideas to light.


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
  •