Advice on coding

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jules

    #1

    Advice on coding

    I have a line of code (below) which is wrinting the word YES back to
    the database. Could anyone tell me what the />Yes is for?


    <input type="radio" id="optDelegate d" name="optDelega ted" value="YES"
    />Yes


    Am I right in thinking that JScript is case sensative? only some of
    the database is Yes and the radio button that this code services isn't
    picking this up.

  • Michael Winter

    #2
    Re: Advice on coding

    Jules wrote:

    [snip]
    [color=blue]
    > Could anyone tell me what the />Yes is for?
    >
    > <input type="radio" id="optDelegate d" name="optDelega ted" value="YES"
    > />Yes[/color]

    XHTML has very strict rules. For elements which don't have closing
    tags, such as INPUT and IMG, the opening tag must end "/>". The "Yes"
    that follows it just text. It's a label for the INPUT element, though
    strictly it should be marked up with

    <label for="optDelegat ed"><input type="radio" id="optDelegate d"
    name="optDelega ted" value="YES" /> Yes</label>

    Note that if the document is marked-up with HTML not XHTML, the
    opening INPUT tag should end normally. That is, with just ">".
    [color=blue]
    > Am I right in thinking that JScript is case sensative?[/color]

    Yes, though I don't see anything to do with JScript (or any scripting
    language, for that matter) in this post. It would have been more
    appropriate to have posted your question to a HTML group.

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.

    Comment

    Working...