Results 1 to 15 of 15

Thread: XHTML woes

  1. #1
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    XHTML woes

    *bangs head against table*

    I'm setting up a site for the local resident association.

    I got some templates, hacked about with them, have everything just as I want it. Haven't notebook coded a website for years, so didn't notice anything too different.

    However, I've done it in xhtml, apparently. It's working on chrome and safari but not IE8 or 9.

    *groan*

    I've had a quick look on the internets, but it's late, I'm two glasses of wine down, and in the doghouse for spending too long on this machine. Does anyone know how to get around this, either in terms of something like altering the header to make ti html4 compliant, or can I easily change the code, or are there tools, or what?

    Or do I have to recode the damn thing.

    Thanks all.

    www.lawboy.co.uk/wychwood/index.html in case you're interested.
    My HTPC: Linky

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Bedfordshire
    Posts
    471
    Thanks
    29
    Thanked
    11 times in 11 posts
    • MarcLister's system
      • Motherboard:
      • Asus P5Q-E
      • CPU:
      • Intel C2Q9650
      • Memory:
      • 8GB
      • Storage:
      • Intel 160GB SSD / 1TB Samsung
      • Graphics card(s):
      • ATI 6700
      • PSU:
      • Corsair 800W MX
      • Case:
      • Antec 300
      • Operating System:
      • W7 x64
      • Monitor(s):
      • 2 x Dell U2410
      • Internet:
      • Sky Fibre

    Re: XHTML woes

    Hi Shooty*. I don't proclaim myself an XHTML wizard but I'll have a go.

    I copied the source of your page and commented out the Javascript line, like so:

    Code:
     <!-- <script type="text/javascript" src="styles/javascript.js" /> -->
    The page then rendered somewhat in IE8. Before I did that I just got a plain white page. I wonder if the link below might help you regarding how to actually add, or declare, a Javascript file/link in your XHTML.

    http://javascript.about.com/library/blxhtml.htm Something like:

    Code:
    <script type="text/javascript">
    /* <![CDATA[ */
    // content of your Javascript goes here
    /* ]]> */
    </script>
    might bring you more luck?

  3. Received thanks from:

    Shooty* (08-10-2010)

  4. #3
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    Duuuuuuuuuuuuuuuude.

    Will have a look. Thank you.
    Thnk it may have been more than 2 glasses of wine. Feels like a 5 glass head this morning
    My HTPC: Linky

  5. #4
    Senior Member kasavien's Avatar
    Join Date
    Aug 2005
    Location
    St. Albans
    Posts
    1,829
    Thanks
    145
    Thanked
    104 times in 49 posts

    Re: XHTML woes

    just had a quick look and the script tag isn't closed in the header, so ie thinks the rest of the page is part of the script.

    Code:
    <script src="styles/javascript.js" type="text/javascript">
    should be

    Code:
    <script src="styles/javascript.js" type="text/javascript"/>
    then the <body></body> should follow after what's contained in the <head></head>

  6. Received thanks from:

    Shooty* (08-10-2010)

  7. #5
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    Hi Kas, thanks for answering. I can't see an unclosed one. Is that on the main index?
    My HTPC: Linky

  8. #6
    LWA
    LWA is offline
    Senior Member
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,171
    Thanks
    134
    Thanked
    57 times in 41 posts

    Re: XHTML woes

    Try a </script> after <script src="styles/javascript.js" type="text/javascript"> ?

  9. Received thanks from:

    Shooty* (08-10-2010)

  10. #7
    PHP Geek Flash477's Avatar
    Join Date
    Dec 2008
    Location
    Devon
    Posts
    822
    Thanks
    51
    Thanked
    72 times in 65 posts

    Re: XHTML woes

    OK, well you main issue is:

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="copy.xsl"?>
    remove those, it is an XHTML document not an XML document - that should do it

    Just for slightly more backwards compatibility, whilst still being correct XHTML I would change

    Code:
    <script type="text/javascript" src="styles/javascript.js" />
    to

    Code:
    <script type="text/javascript" src="styles/javascript.js"></script>

  11. Received thanks from:

    Shooty* (08-10-2010)

  12. #8
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    Cool, will try that. In meantime, have uploaded another vresion based on the first suggestion of removing the java links into comments, at www.lawboy.co.uk/wychwood2/index.html, which works on the IE6 (yes, seriously) that we're constrained to at work, save that the buttons on the left are all very dark, and you have to refresh to reload the image and get it looking right. Most peculiar.
    My HTPC: Linky

  13. #9
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,231
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: XHTML woes

    Quote Originally Posted by Shooty* View Post
    ... Most peculiar.
    Yes, IE6 standards support *is* most peculiar Can I ask *why* you're stuck on IE6? IE8 is a much friendlier browser for web designers to target (frankly even IE7 is better than IE6) and has been released for long enough to be stable and reliable now...

    You've given an xhtml doctype / DTD, declared an xhtml namespace, then set a header stating the content-type is text/html. This isn't a problem in itself; xhtml pages can be served as html and should be understood by a browser, but you might find it preferable to specify html syntax; it's much more forgiving of badly formed pages than xhtml strict . To do this, simply change
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml">
    to
    Code:
    <!DOCTYPE html>
    <html>
    This gets rid of any markings that the page might be xhtml, and lets you be a bit looser about your markup: for instance, I believe xhtml strict requires you to use the shorthand closing method for elements with an "empty" content model, whereas html will allow either the short or long methods, or even an implicit close (this is the difference between, e.g., <link rel="stylesheet" ... />, <link rel="stylesheet" ...></link>, and <link rel="stylesheet" ... >). While I use xhtml 1.0 Transitional in my day job, all the websites I do on the side use the <!DOCTYPE html> setup and work beautifully.

    Incidentally, if you did want to serve the page as xhtml from the server, you'd need to reinsert the <?xml... lines Flash477 said to take out (XHTML documents are *also* xml documents, so you need at least an <?xml version="1.0"?> if you want them to be understood as xml), and change the
    Code:
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    to
    Code:
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
    However, I'd personally take the actions I suggest above to convert the page to html: if you don't need the page to be understood as xml, using xhtml syntax doesn't really offer any advantage...

    In terms of improving maintainability, I'd also go through the pages and remove any unnecessary tags and attributes - there's a lot of <div> ... </div> going on where there are placeholders for content that isn't there, and there's a bunch of links with the rel attribute that isn't necessary. Theoretically they shouldn't affect anything, but again this is IE6 we're talking about so you never know!

    For what it's worth, the page looks fine in Chrome 6.0.472.63 - but I did notice that your contact page is a php script and it looks like your webserver isn't set up to process it properly - I assume you know that and it'll be sorted out before anything goes live, but thought I'd mention it while I was here

  14. #10
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    IE6= law firm IT. And possibly something to do with Citrix. I don't know. I suspect the word "cheap" comes into it somewhere.

    And toansewr Sjim's other points:

    I'll tidy it up later. Blame rapidweaver You're right, though, there are a LOT of divs in there.

    The php thing is borked, and that's a totally new area for me, but I'm going to leave it till I've got the rest working.

    wychwood2 seems to be working fine save the buttons aren't automatically reloading once you navigate away from index.html, unless you refresh. Let's see if your changes help that.
    Last edited by Shooty*; 08-10-2010 at 01:01 PM.
    My HTPC: Linky

  15. #11
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,231
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: XHTML woes

    Quote Originally Posted by Shooty* View Post
    ... law firm IT. ... suspect the word "cheap" comes into it somewhere.
    Not in my experience Expensive *and* rubbish go together far too often in corporate IT, I'm afraid. But yes, that makes sense: you'll have some internal system or other than uses special IE6 tricks and will now cost thousands to rework so it functions like a *proper* web service.

    Don't suppose you could talk them into sorting out whatever rubbish system is causing the issues so they can upgrade to a decent browser? Just point out that as soon as IE6 goes out of support it won't get any more security patches and their entire network will be open to malware exploitation: that should get a law firm moving I know a very good, relatively inexpensive IT consultant / web developer...

    And to pick up on the cross edit

    In Chrome 6 the navigation links all seem to work fine, so unless I'm not picking up something that *should* be there in the first place it looks to me like the html is pretty good. Could well be an IE6 anomaly though. Let us know when you've finished messing and I'll have another look for you (oh, and PM me your firms address so I know where to send the invoice ).
    Last edited by scaryjim; 08-10-2010 at 01:06 PM. Reason: answering cross-edit

  16. #12
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    Heh. That conversation would go something like this:

    me: "we need to upgrade the web browser"
    Them: "Whoa, whoa, whoa, headcount! Who are you?"
    Me: "I work here"
    Them: "let us scan your badge.... OK, unit 27411, how can we help?"
    Me: "we need to upgrade the web browser"
    Them: "we know. But why in particular do you raise this now?"
    Me: "Um... I'm authoring a website for my local residents assocation on the sly during lunch times and those 3 hour meetings you insist on where I sit at the back, with a laptop, and I can't tell if it's working properly."
    Them: "Riiiiiiiiiiiiiiiiiiiight.... Um... haven't you handed in your notice already, and are leaving in two weeks, so really, it's not your problem anymore?"
    Me: "Something like that, yeah. See ya."

    Invoice! Eeeek! I'll pay in kind: Get yourself done for a driving offence in the UK, or get sued by someone you injure, and I'll help you out*


    *for the avoidance of all doubt, I am NOT an ambulance chaser. I work the other side of the fence.
    My HTPC: Linky

  17. #13
    PHP Geek Flash477's Avatar
    Join Date
    Dec 2008
    Location
    Devon
    Posts
    822
    Thanks
    51
    Thanked
    72 times in 65 posts

    Re: XHTML woes

    Quote Originally Posted by scaryjim View Post
    Incidentally, if you did want to serve the page as xhtml from the server, you'd need to reinsert the <?xml... lines Flash477 said to take out (XHTML documents are *also* xml documents, so you need at least an <?xml version="1.0"?> if you want them to be understood as xml)
    Yes, XHTML is also XML, but it is HTML first and foremost - also if you don't have the doctype as the topmost line you will get some very wacky behaviour from IE (box model issues) as it won't recognise the doctype unless it is the very first thing in the page.

  18. #14
    isn't trying to wind U up Shooty*'s Avatar
    Join Date
    Sep 2007
    Location
    West Mids
    Posts
    1,411
    Thanks
    113
    Thanked
    60 times in 48 posts
    • Shooty*'s system
      • PSU:
      • Corsair Modular 620W
      • Case:
      • ThermalTake Tsunami Dream, black, windowed.
      • Internet:
      • Plus Net

    Re: XHTML woes

    I'm opting for the "This site is not configured for use with IE6. Sort yourself out." option.
    My HTPC: Linky

  19. #15
    Not a good person scaryjim's Avatar
    Join Date
    Jan 2009
    Location
    Gateshead
    Posts
    15,196
    Thanks
    1,231
    Thanked
    2,291 times in 1,874 posts
    • scaryjim's system
      • Motherboard:
      • Dell Inspiron
      • CPU:
      • Core i5 8250U
      • Memory:
      • 2x 4GB DDR4 2666
      • Storage:
      • 128GB M.2 SSD + 1TB HDD
      • Graphics card(s):
      • Radeon R5 230
      • PSU:
      • Battery/Dell brick
      • Case:
      • Dell Inspiron 5570
      • Operating System:
      • Windows 10
      • Monitor(s):
      • 15" 1080p laptop panel

    Re: XHTML woes

    Not a bad rule of thumb

    Me: "Um... I'm authoring a website for my local residents assocation on the sly during lunch times and those 3 hour meetings you insist on where I sit at the back, with a laptop, and I can't tell if it's working properly."
    *chortle* that's generally my approach too

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Flash, W3C XHTML Validation and IE
    By Agent in forum Software
    Replies: 4
    Last Post: 17-10-2007, 09:41 AM
  2. Valid xhtml / css?
    By alterion in forum HEXUS Suggestions
    Replies: 2
    Last Post: 20-07-2005, 06:52 PM
  3. Very simple XHTML layout. Impossible with XHTML?
    By southsider in forum Software
    Replies: 4
    Last Post: 08-12-2004, 04:59 PM
  4. Xhtml
    By mike_w in forum Software
    Replies: 38
    Last Post: 07-12-2004, 10:44 AM
  5. Xhtml
    By Gordy in forum Software
    Replies: 5
    Last Post: 15-03-2004, 06:54 PM

Posting Permissions

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