[XHTML 1.1] Attributes can't be used. Alternatives?

Discussion in 'Web Design & Coding' started by Glaanieboy, Feb 27, 2005.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Have a look at my shoutbox (still WIP): http://glaanieboy.nl/shoutbox.php. As you see, I am trying to make my website XHTML 1.1 compliant, just because I want to be prepared for the future. But as you can see in the XHTML validator, there are some thingies that don't work as I am used to as in HTML:
    This means I can't name my <form> tag? If I remove it, I can't use my javascript inputboxes check code.

    See above

    I don't understand this???

    WTF? It doesn't mind the javascripting code in the beginning of the source, but it doesn't like me calling the js function???

    If anyone can take a look at it and tell me what to do, thanks!
     
  2. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    you have to use lowercase attributes, e.g. onsubmit not onSubmit

    As for the name, try using id instead.
     
  3. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Hmm, OK. I changed all attributes to lowercase, it worked (thanks for that!), but the third problem remains :confused: And id doesn't work either :(
     
  4. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    You have to change thejavascript, I forgot about this, with id:

    document.forms['yourid'].name.value
    document.forms['yourid'].shout.value
     
  5. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Another question: Why is the left and middle text misaligned (not at the top)? I can't see anything wrong in the code.
     
  6. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Doesn't work.
     
  7. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    editted my post above about the js, I think its the form screwing your alignment up, add to your css

    form { display: inline; }
     
  8. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Javascript is fixed, but the text is still weird.
     
  9. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago
    This probably won't fix the test problem, but you need to move the <form></form> to out of the table, start it before the main table and close it after it.
     
  10. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Showing a white page for me Glaanie!
     
  11. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    You mean something like this:
    Code:
    <body>
    <form bla=bla etc=etc>
    <table name="main">
    <tr><td>^3 (with another table within to align the <input> boxes)
    </table>
    </form>
    Doesn't this break standards?
     
  12. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
  13. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Polite bump ;) :)
     
  14. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    No. Just do it, then validate.
     
  15. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Hmm, it does validate, and now the stupid error is gone (can't remember what it was). So my site is now 100% XHTML compliant! :D But it didn't solve the aligning problem. It seems the table aligning the input textboxes in the right column could be the problem, since the left and middle text has (about) exactly the amount of blank space to the top as the input-boxes-table is high. Hmmmmmmm.
     
  16. melon

    melon MS-DOS 2.0 Political User

    Messages:
    854
    Location:
    Ásgarðr
    Very cool. I've been paying much more attention to validating my pages too, and the lack of capitalization tip I shall definitely keep in mind. I code in lowercase, but the Javascript I forget about!

    On another note, is it even possible to W3C validate a page with Flash in it? I'll give you an example:

    http://validator.w3.org/check?uri=http://www.xeidon.net

    My own inkling says it's impossible, but I'd be interested in being proven wrong.

    Melon
     
  17. j79zlr

    j79zlr Glaanies script monkey Political User

    Messages:
    2,725
    Location:
    Chicago