XHTML Equivalent

Discussion in 'CSS' started by THT, Jul 4, 2006.

  1. #1
    Whats the XHTML equivalent of the following:

    
    <script LANGUAGE="javascript" FOR="MyControl" EVENT="Connect(reason,Client)">
    
    Code (markup):
    Doesnt like the "for" and "event" properties....
     
    THT, Jul 4, 2006 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    You should study XHTML 1.0. See section 4.2 and appendix C.

    cheers,

    gary
     
    kk5st, Jul 4, 2006 IP
  3. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #3
    THT, technically speaking there is no equivalent, because the FOR and EVENT attributes of the SCRIPT element are not even HTML; they are MSIE extensions. The more standard, more supported, and technically correct method is just as simple:
    [color=red]NO[/color]
    <script type="text/javascript" for="myform" event="onsubmit()">
    . . .
    
    [color=green]YES[/color]
    <script type="text/javascript">
    document.getElementById("myform").onsubmit = function() {
    . . .
    }
    Code (markup):
     
    FeelLikeANut, Jul 4, 2006 IP
  4. THT

    THT Peon

    Messages:
    686
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thanks for a useful (not knee jerk) reply :)

    much apprecxiated
     
    THT, Jul 4, 2006 IP