...

View Full Version : Acceptable practise



Mr J
02-09-2004, 09:04 PM
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">

Vladdy
02-09-2004, 09:15 PM
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">

Mr J
02-09-2004, 09:18 PM
DOH!

Never thought of that


:o

:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum