Web Analytics Made Easy -
StatCounter Acceptable practise - CodingForum

Announcement

Collapse
No announcement yet.

Acceptable practise

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Acceptable practise

    Is it acceptable to put a value in an IMG tag to be referenced by a function


    <img onclick="myclick(this.id,'mydiv')" src="pic.gif" id="mypic" value="52">
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #2
    Just make sure you customize the DTD to keep the code valid.
    However since you use the explicit onclick call why not make it part of the function arguments:
    <img onclick="myclick(this.id,'mydiv',52)" src="pic.gif" id="mypic">
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

    Comment


    • #3
      DOH!

      Never thought of that




      The silent one.

      The most dangerous thing in the world is an idea.
      The most dangerous person in the world is the one with an idea.

      Comment

      Working...
      X